1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-01 06:06:40 +00:00

Add a check for OPAQUE_BIN

This commit is contained in:
unelsson 2021-09-18 14:02:28 +03:00
parent f2a894024a
commit 67894349a9

View file

@ -251,6 +251,13 @@ namespace Resource
node.getOrCreateStateSet()->setAttributeAndModes(depth, osg::StateAttribute::ON);
}
else if (node.getOrCreateStateSet()->getRenderingHint() == osg::StateSet::OPAQUE_BIN)
{
osg::ref_ptr<osg::Depth> depth = SceneUtil::createDepth();
depth->setWriteMask(true);
node.getOrCreateStateSet()->setAttributeAndModes(depth, osg::StateAttribute::ON);
}
/* Check if the <node> has <extra type="Node"> <technique profile="OpenSceneGraph"> <Descriptions> <Description>
correct format for OpenMW: <Description>alphatest mode value MaterialName</Description>