Skip to content

Commit 9fbe9a0

Browse files
committed
Fix #8952
Regression from 2754d42 !5047
1 parent a086ff3 commit 9fbe9a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

components/sceneutil/mwshadowtechnique.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,8 @@ MWShadowTechnique::Frustum::Frustum(osgUtil::CullVisitor* cv, double minZNear, d
645645
{
646646
osg::Matrix::value_type zNear = osg::maximum<osg::Matrix::value_type>(cv->getCalculatedNearPlane(),minZNear);
647647
osg::Matrix::value_type zFar = osg::minimum<osg::Matrix::value_type>(cv->getCalculatedFarPlane(),maxZFar);
648+
if (zFar < 0)
649+
zFar = minZNear;
648650
zNear = std::min(zNear, zFar);
649651

650652
cv->clampProjectionMatrix(projectionMatrix, zNear, zFar);

0 commit comments

Comments
 (0)