1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-20 20:39:42 +00:00

Fix issue where the camera frustum cropping wouldn't consider where casters might cast shadows, just where they actually were.

This commit is contained in:
AnyOldName3 2018-06-19 23:48:59 +01:00
parent f5b144ef77
commit ed68db5ef9

View file

@ -1039,6 +1039,7 @@ void MWShadowTechnique::cull(osgUtil::CullVisitor& cv)
osg::Matrixd cornerConverter = osg::Matrixd::inverse(projectionMatrix) * osg::Matrixd::inverse(viewMatrix) * *cv.getModelViewMatrix();
double minZ = DBL_MAX;
double maxZ = -DBL_MAX;
clsb._bb._max[2] = 1.0;
for (unsigned int i = 0; i < 8; i++)
{
osg::Vec3 corner = clsb._bb.corner(i);