mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-21 03:44:05 +00:00
Force shaders for objects affected by new envmap option
This commit is contained in:
parent
4455c978df
commit
624a9ac353
3 changed files with 10 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
||||||
#include <components/vfs/manager.hpp>
|
#include <components/vfs/manager.hpp>
|
||||||
#include <components/sceneutil/riggeometry.hpp>
|
#include <components/sceneutil/riggeometry.hpp>
|
||||||
#include <components/sceneutil/morphgeometry.hpp>
|
#include <components/sceneutil/morphgeometry.hpp>
|
||||||
|
#include <components/settings/settings.hpp>
|
||||||
|
|
||||||
#include "shadermanager.hpp"
|
#include "shadermanager.hpp"
|
||||||
|
|
||||||
|
@ -138,6 +139,12 @@ namespace Shader
|
||||||
// Bump maps are off by default as well
|
// Bump maps are off by default as well
|
||||||
writableStateSet->setTextureMode(unit, GL_TEXTURE_2D, osg::StateAttribute::ON);
|
writableStateSet->setTextureMode(unit, GL_TEXTURE_2D, osg::StateAttribute::ON);
|
||||||
}
|
}
|
||||||
|
else if (texName == "envMap")
|
||||||
|
{
|
||||||
|
static const bool preLightEnv = Settings::Manager::getBool("apply lighting to environment maps", "Shaders");
|
||||||
|
if (preLightEnv)
|
||||||
|
mRequirements.back().mShaderRequired = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Log(Debug::Error) << "ShaderVisitor encountered unknown texture " << texture;
|
Log(Debug::Error) << "ShaderVisitor encountered unknown texture " << texture;
|
||||||
|
|
|
@ -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.
|
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.
|
Morrowind Code Patch includes an option to remedy that by doing environment-mapping before applying lighting, this is the equivalent of that option.
|
||||||
Has no effect in fixed function pipeline.
|
Affected objects will use shaders.
|
||||||
|
|
|
@ -346,8 +346,8 @@ specular map pattern = _spec
|
||||||
# The filename pattern to probe for when detecting terrain specular maps (see 'auto use terrain specular maps')
|
# The filename pattern to probe for when detecting terrain specular maps (see 'auto use terrain specular maps')
|
||||||
terrain specular map pattern = _diffusespec
|
terrain specular map pattern = _diffusespec
|
||||||
|
|
||||||
# Apply lighting to environment map reflections on the rendered objects like in Morrowind Code Patch.
|
# Apply lighting to reflections on the environment-mapped objects like in Morrowind Code Patch.
|
||||||
# Requires shaders to work.
|
# Affected objects use shaders.
|
||||||
apply lighting to environment maps = false
|
apply lighting to environment maps = false
|
||||||
|
|
||||||
[Input]
|
[Input]
|
||||||
|
|
Loading…
Reference in a new issue