mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 21:09:41 +00:00
sky dummy texture not actually needed when using sky texture slot.
This commit is contained in:
parent
a1df9afc9a
commit
dec9ce4a5f
2 changed files with 0 additions and 27 deletions
|
@ -264,19 +264,6 @@ namespace MWRender
|
|||
stateset->addUniform(new osg::Uniform("skyBlendingStart", 8000000.0f));
|
||||
stateset->addUniform(new osg::Uniform("sky", skyTextureSlot));
|
||||
stateset->addUniform(new osg::Uniform("screenRes", osg::Vec2f{ 1, 1 }));
|
||||
if (Stereo::getMultiview())
|
||||
{
|
||||
// Multiview needs a texture2DArray dummy texture applied here
|
||||
osg::Texture2DArray* textureArray = new osg::Texture2DArray;
|
||||
textureArray->setTextureSize(1, 1, 2);
|
||||
textureArray->setName("fakeSkyTexture");
|
||||
textureArray->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
|
||||
textureArray->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
|
||||
textureArray->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
|
||||
textureArray->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
|
||||
textureArray->setWrap(osg::Texture::WRAP_R, osg::Texture::CLAMP_TO_EDGE);
|
||||
stateset->setTextureAttributeAndModes(skyTextureSlot, textureArray, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE | osg::StateAttribute::PROTECTED);
|
||||
}
|
||||
|
||||
stateset->addUniform(new osg::Uniform("emissiveMult", 1.f));
|
||||
|
||||
|
|
|
@ -746,20 +746,6 @@ namespace MWRender
|
|||
stateset->addUniform(new osg::Uniform("skyBlendingStart", 8000000.0f));
|
||||
stateset->addUniform(new osg::Uniform("sky", skyTextureSlot));
|
||||
stateset->addUniform(new osg::Uniform("screenRes", osg::Vec2f{ 1, 1 }));
|
||||
if (Stereo::getMultiview())
|
||||
{
|
||||
// Multiview needs a texture2DArray dummy texture applied here
|
||||
osg::Texture2DArray* textureArray = new osg::Texture2DArray;
|
||||
textureArray->setTextureSize(1, 1, 2);
|
||||
textureArray->setName("fakeSkyTexture");
|
||||
textureArray->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
|
||||
textureArray->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
|
||||
textureArray->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
|
||||
textureArray->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
|
||||
textureArray->setWrap(osg::Texture::WRAP_R, osg::Texture::CLAMP_TO_EDGE);
|
||||
stateset->setTextureAttributeAndModes(skyTextureSlot, textureArray,
|
||||
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE | osg::StateAttribute::PROTECTED);
|
||||
}
|
||||
|
||||
osg::ref_ptr<osg::LightModel> lightmodel = new osg::LightModel;
|
||||
lightmodel->setAmbientIntensity(osg::Vec4(0.3f, 0.3f, 0.3f, 1.f));
|
||||
|
|
Loading…
Reference in a new issue