1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-11-08 21:46:43 +00:00

Don't run osg::Depth replacement visitor for NIF templates

This commit is contained in:
Alexei Kotov 2025-08-23 09:13:30 +03:00
parent 4fd9e5b2bb
commit 47130e2155

View file

@ -701,6 +701,10 @@ namespace Resource
node->accept(renamingVisitor); node->accept(renamingVisitor);
} }
// Replace osg::Depth with reverse-Z-compatible SceneUtil::AutoDepth
SceneUtil::ReplaceDepthVisitor replaceDepthVisitor;
node->accept(replaceDepthVisitor);
for (osg::Node* foundRigNode : rigFinder.mFoundNodes) for (osg::Node* foundRigNode : rigFinder.mFoundNodes)
{ {
if (foundRigNode->libraryName() == std::string_view("osgAnimation")) if (foundRigNode->libraryName() == std::string_view("osgAnimation"))
@ -1019,9 +1023,6 @@ namespace Resource
mMinFilter, mMagFilter, mMaxAnisotropy); mMinFilter, mMagFilter, mMaxAnisotropy);
loaded->accept(setFilterSettingsControllerVisitor); loaded->accept(setFilterSettingsControllerVisitor);
SceneUtil::ReplaceDepthVisitor replaceDepthVisitor;
loaded->accept(replaceDepthVisitor);
osg::ref_ptr<Shader::ShaderVisitor> shaderVisitor(createShaderVisitor()); osg::ref_ptr<Shader::ShaderVisitor> shaderVisitor(createShaderVisitor());
loaded->accept(*shaderVisitor); loaded->accept(*shaderVisitor);