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

Eliminate unused uniform

This commit is contained in:
AnyOldName3 2024-02-20 23:10:03 +00:00
parent 132c43affa
commit d282fdb77a
3 changed files with 0 additions and 12 deletions

View file

@ -1025,7 +1025,6 @@ void MWShadowTechnique::cull(osgUtil::CullVisitor& cv)
{
dummyState->setTextureAttribute(i, _fallbackShadowMapTexture, osg::StateAttribute::ON);
dummyState->addUniform(new osg::Uniform(("shadowTexture" + std::to_string(i - baseUnit)).c_str(), i));
dummyState->addUniform(new osg::Uniform(("shadowTextureUnit" + std::to_string(i - baseUnit)).c_str(), i));
}
cv.pushStateSet(dummyState);
@ -1711,14 +1710,6 @@ void MWShadowTechnique::createShaders()
for (auto& perFrameUniformList : _uniforms)
perFrameUniformList.emplace_back(shadowTextureSampler.get());
}
{
std::stringstream sstr;
sstr<<"shadowTextureUnit"<<sm_i;
osg::ref_ptr<osg::Uniform> shadowTextureUnit = new osg::Uniform(sstr.str().c_str(),(int)(settings->getBaseShadowTextureUnit()+sm_i));
for (auto& perFrameUniformList : _uniforms)
perFrameUniformList.emplace_back(shadowTextureUnit.get());
}
}
switch(settings->getShaderHint())

View file

@ -105,8 +105,6 @@ namespace SceneUtil
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE | osg::StateAttribute::PROTECTED);
stateset.addUniform(new osg::Uniform(
("shadowTexture" + std::to_string(i - mShadowSettings->getBaseShadowTextureUnit())).c_str(), i));
stateset.addUniform(new osg::Uniform(
("shadowTextureUnit" + std::to_string(i - mShadowSettings->getBaseShadowTextureUnit())).c_str(), i));
}
}

View file

@ -3,7 +3,6 @@
#if SHADOWS
@foreach shadow_texture_unit_index @shadow_texture_unit_list
uniform mat4 shadowSpaceMatrix@shadow_texture_unit_index;
uniform int shadowTextureUnit@shadow_texture_unit_index;
varying vec4 shadowSpaceCoords@shadow_texture_unit_index;
#if @perspectiveShadowMaps