From 062410bd8c83fe4b2cd927c2c6d6f5031a175c8e Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 23 Feb 2016 10:56:18 +0100 Subject: [PATCH] Don't incorrectly remove TexEnv state --- components/shader/shadervisitor.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/components/shader/shadervisitor.cpp b/components/shader/shadervisitor.cpp index c88200759..b06ceafde 100644 --- a/components/shader/shadervisitor.cpp +++ b/components/shader/shadervisitor.cpp @@ -142,13 +142,6 @@ namespace Shader std::cerr << "ShaderVisitor encountered unknown texture " << texture << std::endl; } } - // remove state that has no effect when rendering with shaders - if (stateset->getTextureAttribute(unit, osg::StateAttribute::TEXENV)) - { - if (!writableStateSet) - writableStateSet = getWritableStateSet(node); - writableStateSet->removeTextureAttribute(unit, osg::StateAttribute::TEXENV); - } } if (mAutoUseNormalMaps && diffuseMap != NULL && normalMap == NULL)