1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 09:53:50 +00:00

Water shader no longer depends on object shaders being enabled

This commit is contained in:
scrawl 2013-02-24 10:28:50 +01:00
parent 3135482cee
commit 0d6a3367d3
2 changed files with 16 additions and 23 deletions

View file

@ -264,16 +264,9 @@ namespace MWGui
mRefractionButton->setCaptionWithReplacing (Settings::Manager::getBool("refraction", "Water") ? "#{sOn}" : "#{sOff}"); mRefractionButton->setCaptionWithReplacing (Settings::Manager::getBool("refraction", "Water") ? "#{sOn}" : "#{sOff}");
if (!MWRender::RenderingManager::waterShaderSupported())
{
mWaterShaderButton->setEnabled(false);
mReflectObjectsButton->setEnabled(false);
mReflectActorsButton->setEnabled(false);
mReflectTerrainButton->setEnabled(false);
}
if (!Settings::Manager::getBool("shaders", "Objects")) if (!Settings::Manager::getBool("shaders", "Objects"))
{ {
mRefractionButton->setEnabled(false);
mUnderwaterButton->setEnabled (false); mUnderwaterButton->setEnabled (false);
mShadowsEnabledButton->setEnabled(false); mShadowsEnabledButton->setEnabled(false);
} }
@ -466,15 +459,15 @@ namespace MWGui
{ {
Settings::Manager::setBool("shaders", "Objects", false); Settings::Manager::setBool("shaders", "Objects", false);
// water shader not supported with object shaders off
mWaterShaderButton->setCaptionWithReplacing("#{sOff}");
mUnderwaterButton->setCaptionWithReplacing("#{sOff}"); mUnderwaterButton->setCaptionWithReplacing("#{sOff}");
mWaterShaderButton->setEnabled(false);
mReflectObjectsButton->setEnabled(false);
mReflectActorsButton->setEnabled(false);
mReflectTerrainButton->setEnabled(false);
mUnderwaterButton->setEnabled(false); mUnderwaterButton->setEnabled(false);
Settings::Manager::setBool("shader", "Water", false);
// refraction needs shaders to display underwater fog
mRefractionButton->setCaptionWithReplacing("#{sOff}");
mRefractionButton->setEnabled(false);
Settings::Manager::setBool("refraction", "Water", false);
Settings::Manager::setBool("underwater effect", "Water", false); Settings::Manager::setBool("underwater effect", "Water", false);
// shadows not supported // shadows not supported
@ -487,13 +480,11 @@ namespace MWGui
Settings::Manager::setBool("shaders", "Objects", true); Settings::Manager::setBool("shaders", "Objects", true);
// re-enable // re-enable
if (MWRender::RenderingManager::waterShaderSupported()) mReflectObjectsButton->setEnabled(true);
{ mReflectActorsButton->setEnabled(true);
mWaterShaderButton->setEnabled(true); mReflectTerrainButton->setEnabled(true);
mReflectObjectsButton->setEnabled(true); mRefractionButton->setEnabled(true);
mReflectActorsButton->setEnabled(true);
mReflectTerrainButton->setEnabled(true);
}
mUnderwaterButton->setEnabled(true); mUnderwaterButton->setEnabled(true);
mShadowsEnabledButton->setEnabled(true); mShadowsEnabledButton->setEnabled(true);
} }

View file

@ -1,5 +1,7 @@
material Water material Water
{ {
allow_fixed_function false
pass pass
{ {
emissive 1.0 1.0 1.0 emissive 1.0 1.0 1.0