summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpsi29a <psi29a@gmail.com>2022-01-05 08:38:05 +0000
committerpsi29a <psi29a@gmail.com>2022-01-05 08:38:05 +0000
commit5eba352c9850cc6a64fcc8b6f55539e50aa82db6 (patch)
tree4e53f83fc9437f846ed80eec0ac6c07bdbe813a0
parentd8cc08a7a049319f184e4a08b41203f7e83eba4f (diff)
parent2c5269536131d5134d825e0cfc77081a510fe83d (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.cpp2
-rw-r--r--components/terrain/material.cpp2
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))
{
}
};