From Geoff Michel, fixed the handling of zfar values of 0.0.

This commit is contained in:
Robert Osfield
2005-12-01 13:19:16 +00:00
parent 8c3219151d
commit 65f63428e5

View File

@@ -595,9 +595,9 @@ bool CullVisitor::updateCalculatedNearFar(const osg::Matrix& matrix,const osg::D
}
}
if (d_far<0.0)
if (d_far<=0.0) // gwm if ==0 extends purely behind eye, forces far to 0 get invalid projection matrix (ratio near:far=inf)
{
// whole object behind the eye point so disguard
// whole object behind the eye point so discard
return false;
}