Water shader no longer depends on object shaders being enabled

actorid
scrawl 12 years ago
parent 3135482cee
commit 0d6a3367d3

@ -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);
} }

@ -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
@ -44,7 +46,7 @@ material Water
tex_address_mode border tex_address_mode border
tex_border_colour 0.5 0.5 1.0 tex_border_colour 0.5 0.5 1.0
} }
// for simple_water // for simple_water
texture_unit animatedTexture texture_unit animatedTexture
{ {

Loading…
Cancel
Save