mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-20 19:39:41 +00:00
Ensure TerrainDrawables affect the computed near/far planes.
This commit is contained in:
parent
bf9a1ded63
commit
112ade2a3f
1 changed files with 6 additions and 0 deletions
|
@ -47,6 +47,12 @@ void TerrainDrawable::cull(osgUtil::CullVisitor *cv)
|
|||
|
||||
osg::RefMatrix& matrix = *cv->getModelViewMatrix();
|
||||
|
||||
if (cv->getComputeNearFarMode() && bb.valid())
|
||||
{
|
||||
if (!cv->updateCalculatedNearFar(matrix, *this, false))
|
||||
return;
|
||||
}
|
||||
|
||||
float depth = bb.valid() ? distance(bb.center(),matrix) : 0.0f;
|
||||
if (osg::isNaN(depth))
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue