From ed68db5ef9edba4417a9db79f598c3bf0474b9dc Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Tue, 19 Jun 2018 23:48:59 +0100 Subject: [PATCH] Fix issue where the camera frustum cropping wouldn't consider where casters might cast shadows, just where they actually were. --- components/sceneutil/mwshadowtechnique.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/components/sceneutil/mwshadowtechnique.cpp b/components/sceneutil/mwshadowtechnique.cpp index 0bb8a26c9..56be0b8a0 100644 --- a/components/sceneutil/mwshadowtechnique.cpp +++ b/components/sceneutil/mwshadowtechnique.cpp @@ -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);