1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 04:23:53 +00:00

Merge branch 'correct_depth_function' into 'master'

Use correct depth functions (#6537)

Closes #6537

See merge request OpenMW/openmw!1534
This commit is contained in:
psi29a 2022-01-05 08:38:05 +00:00
commit 5eba352c98
2 changed files with 2 additions and 2 deletions

View file

@ -816,7 +816,7 @@ namespace MWRender
osg::StateSet* queryStateSet = new osg::StateSet; osg::StateSet* queryStateSet = new osg::StateSet;
if (queryVisible) if (queryVisible)
{ {
osg::ref_ptr<osg::Depth> depth = new SceneUtil::AutoDepth; osg::ref_ptr<osg::Depth> depth = new SceneUtil::AutoDepth(osg::Depth::LEQUAL);
// This is a trick to make fragments written by the query always use the maximum depth value, // This is a trick to make fragments written by the query always use the maximum depth value,
// without having to retrieve the current far clipping distance. // without having to retrieve the current far clipping distance.
// We want the sun glare to be "infinitely" far away. // We want the sun glare to be "infinitely" far away.

View file

@ -106,7 +106,7 @@ namespace
osg::ref_ptr<osg::Depth> mValue; osg::ref_ptr<osg::Depth> mValue;
LequalDepth() LequalDepth()
: mValue(new SceneUtil::AutoDepth) : mValue(new SceneUtil::AutoDepth(osg::Depth::LEQUAL))
{ {
} }
}; };