diff options
author | psi29a <psi29a@gmail.com> | 2022-01-05 08:38:05 +0000 |
---|---|---|
committer | psi29a <psi29a@gmail.com> | 2022-01-05 08:38:05 +0000 |
commit | 5eba352c9850cc6a64fcc8b6f55539e50aa82db6 (patch) | |
tree | 4e53f83fc9437f846ed80eec0ac6c07bdbe813a0 | |
parent | d8cc08a7a049319f184e4a08b41203f7e83eba4f (diff) | |
parent | 2c5269536131d5134d825e0cfc77081a510fe83d (diff) |
Merge branch 'correct_depth_function' into 'master'
Use correct depth functions (#6537)
Closes #6537
See merge request OpenMW/openmw!1534
-rw-r--r-- | apps/openmw/mwrender/skyutil.cpp | 2 | ||||
-rw-r--r-- | components/terrain/material.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/openmw/mwrender/skyutil.cpp b/apps/openmw/mwrender/skyutil.cpp index c0b6f81358..ead9d9af70 100644 --- a/apps/openmw/mwrender/skyutil.cpp +++ b/apps/openmw/mwrender/skyutil.cpp @@ -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. diff --git a/components/terrain/material.cpp b/components/terrain/material.cpp index ae432d262e..6ae1a970d3 100644 --- a/components/terrain/material.cpp +++ b/components/terrain/material.cpp @@ -106,7 +106,7 @@ namespace osg::ref_ptr<osg::Depth> mValue; LequalDepth() - : mValue(new SceneUtil::AutoDepth) + : mValue(new SceneUtil::AutoDepth(osg::Depth::LEQUAL)) { } }; |