mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 21:41:04 +00:00
Resolve computed near plane issues with extremely high viewing distances.
This commit is contained in:
parent
759e6fb804
commit
50fdd0be99
@ -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…
x
Reference in New Issue
Block a user