1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 09:32:45 +00:00

Fix OpenGL errors

There's no reason to use the AndModes variant as we never (intentionally) attempt to sample from a shadow map via the FFP.
This commit is contained in:
AnyOldName3 2024-02-20 21:23:23 +00:00
parent 535c5e328a
commit 7391bf2814

View File

@ -101,7 +101,7 @@ namespace SceneUtil
for (int i = mShadowSettings->getBaseShadowTextureUnit();
i < mShadowSettings->getBaseShadowTextureUnit() + mShadowSettings->getNumShadowMapsPerLight(); ++i)
{
stateset.setTextureAttributeAndModes(i, fakeShadowMapTexture,
stateset.setTextureAttribute(i, fakeShadowMapTexture,
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE | osg::StateAttribute::PROTECTED);
stateset.addUniform(new osg::Uniform(
("shadowTexture" + std::to_string(i - mShadowSettings->getBaseShadowTextureUnit())).c_str(), i));