1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 06:45:32 +00:00

Resolve computed near plane issues with extremely high viewing distances.

This commit is contained in:
AnyOldName3 2018-05-29 00:52:43 +01:00
parent 759e6fb804
commit 50fdd0be99

View file

@ -927,6 +927,9 @@ void MWShadowTechnique::cull(osgUtil::CullVisitor& cv)
//OSG_NOTICE<<"maxZFar "<<maxZFar<<std::endl;
// Workaround for absurdly huge viewing distances where OSG would otherwise push the near plane out.
cv.setNearFarRatio(minZNear / maxZFar);
Frustum frustum(&cv, minZNear, maxZFar);
if (_debugHud)
_debugHud->setFrustumVertices(new osg::Vec3dArray(8, &frustum.corners[0]));