diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 91232d03a..644e82484 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -41,7 +41,6 @@ #include #include #include -#include #include "particle.hpp" #include "userdata.hpp" @@ -428,29 +427,12 @@ namespace NifOsg texture2d->setWrap(osg::Texture::WRAP_S, wrapS ? osg::Texture::REPEAT : osg::Texture::CLAMP_TO_EDGE); texture2d->setWrap(osg::Texture::WRAP_T, wrapT ? osg::Texture::REPEAT : osg::Texture::CLAMP_TO_EDGE); - static const bool preLightEnv = Settings::Manager::getBool("apply lighting to environment maps", "Shaders"); osg::ref_ptr texEnv = new osg::TexEnvCombine; - if (!preLightEnv) - { - texEnv->setCombine_Alpha(osg::TexEnvCombine::REPLACE); - texEnv->setSource0_Alpha(osg::TexEnvCombine::PREVIOUS); - texEnv->setCombine_RGB(osg::TexEnvCombine::ADD); - texEnv->setSource0_RGB(osg::TexEnvCombine::PREVIOUS); - texEnv->setSource1_RGB(osg::TexEnvCombine::TEXTURE); - } - else - { - texEnv->setCombine_RGB(osg::TexEnvCombine::INTERPOLATE); - texEnv->setSource0_RGB(osg::TexEnvCombine::TEXTURE); - texEnv->setOperand0_RGB(osg::TexEnvCombine::SRC_COLOR); - texEnv->setSource1_RGB(osg::TexEnvCombine::PREVIOUS); - texEnv->setOperand1_RGB(osg::TexEnvCombine::SRC_COLOR); - texEnv->setSource2_RGB(osg::TexEnvCombine::TEXTURE); - texEnv->setOperand2_RGB(osg::TexEnvCombine::SRC_ALPHA); - texEnv->setCombine_Alpha(osg::TexEnvCombine::REPLACE); - texEnv->setSource0_Alpha(osg::TexEnvCombine::PREVIOUS); - texEnv->setOperand0_Alpha(osg::TexEnvCombine::SRC_ALPHA); - } + texEnv->setCombine_Alpha(osg::TexEnvCombine::REPLACE); + texEnv->setSource0_Alpha(osg::TexEnvCombine::PREVIOUS); + texEnv->setCombine_RGB(osg::TexEnvCombine::ADD); + texEnv->setSource0_RGB(osg::TexEnvCombine::PREVIOUS); + texEnv->setSource1_RGB(osg::TexEnvCombine::TEXTURE); int texUnit = 3; // FIXME diff --git a/docs/source/reference/modding/settings/shaders.rst b/docs/source/reference/modding/settings/shaders.rst index 8f1040225..eaea53972 100644 --- a/docs/source/reference/modding/settings/shaders.rst +++ b/docs/source/reference/modding/settings/shaders.rst @@ -134,4 +134,4 @@ apply lighting to environment maps Normally environment map reflections aren't affected by lighting, which makes environment-mapped (and thus bump-mapped objects) glow in the dark. Morrowind Code Patch includes an option to remedy that by doing environment-mapping before applying lighting, this is the equivalent of that option. -This also affects fixed function pipeline rendering. +Has no effect in fixed function pipeline. diff --git a/files/settings-default.cfg b/files/settings-default.cfg index b7e0eb6c2..523ffc2f6 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -347,7 +347,7 @@ specular map pattern = _spec terrain specular map pattern = _diffusespec # Apply lighting to environment map reflections on the rendered objects like in Morrowind Code Patch. -# Also affects fixed function pipeline. +# Requires shaders to work. apply lighting to environment maps = false [Input]