Depth refactor

This commit is contained in:
Cody Glassman 2021-11-21 02:25:05 +00:00 committed by AnyOldName3
parent a9d7598532
commit d85f772269
27 changed files with 262 additions and 232 deletions

View file

@ -42,7 +42,7 @@
#include <iterator>
#include <components/sceneutil/util.hpp>
#include <components/sceneutil/depth.hpp>
using namespace osgUtil;
@ -1597,8 +1597,8 @@ bool Optimizer::MergeGeometryVisitor::mergeGroup(osg::Group& group)
}
if (_alphaBlendingActive && _mergeAlphaBlending && !geom->getStateSet())
{
auto d = createDepth();
d->setWriteMask(0);
osg::ref_ptr<osg::Depth> d = new SceneUtil::AutoDepth;
d->setWriteMask(false);
geom->getOrCreateStateSet()->setAttribute(d);
}
}