1
0
forked from 0ad/0ad
0ad/source/maths
Ykkrosh b1b96a89d6 Fix culling for shadows and reflections.
Previously we had a single culling frustum based on the main camera, and
any object outside the frustum would never get rendered, even if it
should actually contribute to shadows or reflections/refractions. This
caused ugly pop-in effects in the shadows and reflections while
scrolling.

Extend the renderer to support multiple cull groups, each with a
separate frustum and with separate lists of submitted objects, so that
shadows and reflections will render the correctly culled sets of
objects.

Update the shadow map generation to compute the (hopefully) correct
bounds and matrices for this new scheme.

Include terrain patches in the shadow bounds, so hills can cast shadows
correctly.

Remove the code that tried to render objects slightly outside the camera
frustum in order to reduce the pop-in effect, since that was a
workaround for the lack of a proper fix.

Remove the model/patch filtering code, which was used to cull objects
that were in the normal camera frustum but should be excluded from
reflections/refractions, since that's redundant now too.

Inline DistanceToPlane to save a few hundred usecs per frame inside
CCmpUnitRenderer::RenderSubmit.

Fixes #504, #579.

This was SVN commit r15445.
2014-06-25 01:11:10 +00:00
..
tests Fix VS2013 build errors, warnings 2013-11-03 12:46:07 +00:00
BoundingBoxAligned.cpp Fix culling for shadows and reflections. 2014-06-25 01:11:10 +00:00
BoundingBoxAligned.h Fix culling for shadows and reflections. 2014-06-25 01:11:10 +00:00
BoundingBoxOriented.cpp Fixed AABB to OBB transformation resulting in NaN basis vectors when the AABB size in one or more dimensions is zero. Fixes #1121. 2012-05-31 23:17:15 +00:00
BoundingBoxOriented.h Avoid non-ASCII characters in source code, since tools don't decode them consistently. 2013-10-20 09:27:44 +00:00
BoundingSphere.h Add BoundingSphere, SOverlaySphere. 2014-06-01 18:05:46 +00:00
Brush.cpp Fix culling for shadows and reflections. 2014-06-25 01:11:10 +00:00
Brush.h Fix culling for shadows and reflections. 2014-06-25 01:11:10 +00:00
Ease.h Pretty unit selection overlay rings. Fixes #824. 2012-04-22 04:04:02 +00:00
Fixed.cpp Remove a load of implicit CStr type conversions, since they're error-prone and can cause silent data loss. 2011-02-17 20:08:20 +00:00
Fixed.h Optimise fixed multiplies on MSVC x86 2013-09-20 20:17:54 +00:00
FixedVector2D.h Optimise fixed multiplies on MSVC x86 2013-09-20 20:17:54 +00:00
FixedVector3D.h Optimise fixed multiplies on MSVC x86 2013-09-20 20:17:54 +00:00
MathUtil.h Graphics optimisations and features from eihrul. 2011-07-12 23:48:05 +00:00
Matrix3D.cpp More GLES compatibility. 2012-02-12 13:20:49 +00:00
Matrix3D.h Add support for specular materials. 2012-04-08 15:55:06 +00:00
MD5.cpp split debug_assert into ENSURE and ASSERT as discussed in a previous meeting. 2011-04-30 13:01:45 +00:00
MD5.h Force some byte-order functions to be inline. 2010-05-25 18:47:11 +00:00
Noise.cpp # New territory border rendering. 2011-07-30 00:56:45 +00:00
Noise.h Makes some classes NONCOPYABLE, based on patch by Markus, refs #1852 2013-05-22 21:40:56 +00:00
NUSpline.cpp split debug_assert into ENSURE and ASSERT as discussed in a previous meeting. 2011-04-30 13:01:45 +00:00
NUSpline.h Add GPL header 2009-04-18 17:00:33 +00:00
Plane.cpp Fix culling for shadows and reflections. 2014-06-25 01:11:10 +00:00
Plane.h Fix culling for shadows and reflections. 2014-06-25 01:11:10 +00:00
Quaternion.cpp Inline common vector/matrix operations, for performance. 2010-09-24 16:54:20 +00:00
Quaternion.h fix relics of GPL comment insertion (removing empty description comments and in some cases adding new file descriptions) 2009-05-03 11:47:38 +00:00
Random.h Fix build with old GCC 2011-08-04 21:36:57 +00:00
Sqrt.cpp # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
Sqrt.h # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
Vector2D.h Pretty unit selection overlay rings. Fixes #824. 2012-04-22 04:04:02 +00:00
Vector3D.cpp Improve camera restraints at edge of map to be independent of zoom, and to work on circular maps. 2011-03-04 20:02:05 +00:00
Vector3D.h Improve camera restraints at edge of map to be independent of zoom, and to work on circular maps. 2011-03-04 20:02:05 +00:00
Vector4D.h Add support for specular materials. 2012-04-08 15:55:06 +00:00