Skip to content

Commit 01bcd6a

Browse files
committed
Merge branch 'even-if-youre-there' into 'master'
Fix #8952 Closes #8952 See merge request OpenMW/openmw!5144
2 parents bce4f40 + 9fbe9a0 commit 01bcd6a

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)