mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53: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:
commit
5eba352c98
2 changed files with 2 additions and 2 deletions
|
@ -816,7 +816,7 @@ namespace MWRender
|
|||
osg::StateSet* queryStateSet = new osg::StateSet;
|
||||
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,
|
||||
// without having to retrieve the current far clipping distance.
|
||||
// We want the sun glare to be "infinitely" far away.
|
||||
|
|
|
@ -106,7 +106,7 @@ namespace
|
|||
osg::ref_ptr<osg::Depth> mValue;
|
||||
|
||||
LequalDepth()
|
||||
: mValue(new SceneUtil::AutoDepth)
|
||||
: mValue(new SceneUtil::AutoDepth(osg::Depth::LEQUAL))
|
||||
{
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue