diff options
author | glassmancody.info <glassmancody.info@gmail.com> | 2022-01-04 12:23:37 -0800 |
---|---|---|
committer | glassmancody.info <glassmancody.info@gmail.com> | 2022-01-04 12:23:37 -0800 |
commit | 2c5269536131d5134d825e0cfc77081a510fe83d (patch) | |
tree | b0309c047cb84a64abe19924767677855a11de05 | |
parent | b6572fbe42e4c560c7beefe6544b3320a5cd70f9 (diff) |
fix regression where LEQUAL was used instead of LESS for depth function
-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)) { } }; |