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:
parent
759e6fb804
commit
50fdd0be99
1 changed files with 4 additions and 1 deletions
|
@ -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]));
|
||||
|
|
Loading…
Reference in a new issue