forked from 0ad/0ad
Ykkrosh
b1b96a89d6
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. |
||
---|---|---|
.. | ||
tests | ||
BoundingBoxAligned.cpp | ||
BoundingBoxAligned.h | ||
BoundingBoxOriented.cpp | ||
BoundingBoxOriented.h | ||
BoundingSphere.h | ||
Brush.cpp | ||
Brush.h | ||
Ease.h | ||
Fixed.cpp | ||
Fixed.h | ||
FixedVector2D.h | ||
FixedVector3D.h | ||
MathUtil.h | ||
Matrix3D.cpp | ||
Matrix3D.h | ||
MD5.cpp | ||
MD5.h | ||
Noise.cpp | ||
Noise.h | ||
NUSpline.cpp | ||
NUSpline.h | ||
Plane.cpp | ||
Plane.h | ||
Quaternion.cpp | ||
Quaternion.h | ||
Random.h | ||
Sqrt.cpp | ||
Sqrt.h | ||
Vector2D.h | ||
Vector3D.cpp | ||
Vector3D.h | ||
Vector4D.h |