1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-03 03:41:32 +00:00

Update addedState in shadervisitor.cpp

This commit is contained in:
Petr Mikheev 2023-09-27 21:19:59 +02:00
parent 63d5bd6f8a
commit a401461a64

View file

@ -687,7 +687,9 @@ namespace Shader
{
if (reqs.mSoftParticles)
defineMap["disableNormals"] = "1";
writableStateSet->setAttribute(new osg::ColorMaski(1, false, false, false, false));
auto colorMask = new osg::ColorMaski(1, false, false, false, false);
writableStateSet->setAttribute(colorMask);
addedState->setAttribute(colorMask);
}
if (reqs.mSoftParticles)
@ -695,6 +697,7 @@ namespace Shader
const int unitSoftEffect
= mShaderManager.reserveGlobalTextureUnits(Shader::ShaderManager::Slot::OpaqueDepthTexture);
writableStateSet->addUniform(new osg::Uniform("opaqueDepthTex", unitSoftEffect));
addedState->addUniform("opaqueDepthTex");
}
if (writableStateSet->getMode(GL_ALPHA_TEST) != osg::StateAttribute::INHERIT