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}");
if (!MWRender::RenderingManager::waterShaderSupported())
{
mWaterShaderButton->setEnabled(false);
mReflectObjectsButton->setEnabled(false);
mReflectActorsButton->setEnabled(false);
mReflectTerrainButton->setEnabled(false);
}
if (!Settings::Manager::getBool("shaders", "Objects"))
{
mRefractionButton->setEnabled(false);
mUnderwaterButton->setEnabled (false);
mShadowsEnabledButton->setEnabled(false);
}
@ -466,15 +459,15 @@ namespace MWGui
{
Settings::Manager::setBool("shaders", "Objects", false);
// water shader not supported with object shaders off
mWaterShaderButton->setCaptionWithReplacing("#{sOff}");
mUnderwaterButton->setCaptionWithReplacing("#{sOff}");
mWaterShaderButton->setEnabled(false);
mReflectObjectsButton->setEnabled(false);
mReflectActorsButton->setEnabled(false);
mReflectTerrainButton->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);
// shadows not supported
@ -487,13 +480,11 @@ namespace MWGui
Settings::Manager::setBool("shaders", "Objects", true);
// re-enable
if (MWRender::RenderingManager::waterShaderSupported())
{
mWaterShaderButton->setEnabled(true);
mReflectObjectsButton->setEnabled(true);
mReflectActorsButton->setEnabled(true);
mReflectTerrainButton->setEnabled(true);
}
mReflectObjectsButton->setEnabled(true);
mReflectActorsButton->setEnabled(true);
mReflectTerrainButton->setEnabled(true);
mRefractionButton->setEnabled(true);
mUnderwaterButton->setEnabled(true);
mShadowsEnabledButton->setEnabled(true);
}

@ -1,5 +1,7 @@
material Water
{
allow_fixed_function false
pass
{
emissive 1.0 1.0 1.0
@ -44,7 +46,7 @@ material Water
tex_address_mode border
tex_border_colour 0.5 0.5 1.0
}
// for simple_water
texture_unit animatedTexture
{

Loading…
Cancel
Save