mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-16 01:06:44 +00:00
Eliminate unused uniform
This commit is contained in:
parent
132c43affa
commit
d282fdb77a
3 changed files with 0 additions and 12 deletions
|
@ -1025,7 +1025,6 @@ void MWShadowTechnique::cull(osgUtil::CullVisitor& cv)
|
||||||
{
|
{
|
||||||
dummyState->setTextureAttribute(i, _fallbackShadowMapTexture, osg::StateAttribute::ON);
|
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(("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);
|
cv.pushStateSet(dummyState);
|
||||||
|
@ -1711,14 +1710,6 @@ void MWShadowTechnique::createShaders()
|
||||||
for (auto& perFrameUniformList : _uniforms)
|
for (auto& perFrameUniformList : _uniforms)
|
||||||
perFrameUniformList.emplace_back(shadowTextureSampler.get());
|
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())
|
switch(settings->getShaderHint())
|
||||||
|
|
|
@ -105,8 +105,6 @@ namespace SceneUtil
|
||||||
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE | osg::StateAttribute::PROTECTED);
|
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE | osg::StateAttribute::PROTECTED);
|
||||||
stateset.addUniform(new osg::Uniform(
|
stateset.addUniform(new osg::Uniform(
|
||||||
("shadowTexture" + std::to_string(i - mShadowSettings->getBaseShadowTextureUnit())).c_str(), i));
|
("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));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#if SHADOWS
|
#if SHADOWS
|
||||||
@foreach shadow_texture_unit_index @shadow_texture_unit_list
|
@foreach shadow_texture_unit_index @shadow_texture_unit_list
|
||||||
uniform mat4 shadowSpaceMatrix@shadow_texture_unit_index;
|
uniform mat4 shadowSpaceMatrix@shadow_texture_unit_index;
|
||||||
uniform int shadowTextureUnit@shadow_texture_unit_index;
|
|
||||||
varying vec4 shadowSpaceCoords@shadow_texture_unit_index;
|
varying vec4 shadowSpaceCoords@shadow_texture_unit_index;
|
||||||
|
|
||||||
#if @perspectiveShadowMaps
|
#if @perspectiveShadowMaps
|
||||||
|
|
Loading…
Reference in a new issue