From ee40b41285cce4af6a49e6c91f98dac75afaaa0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sat, 9 Dec 2017 14:03:56 +0100 Subject: [PATCH] Add slider for refraction size in settings window --- apps/openmw/mwrender/water.cpp | 2 +- .../reference/modding/settings/water.rst | 2 +- files/mygui/openmw_settings_window.layout | 24 ++++++++++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index dbfee05df..043f1f697 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -272,7 +272,7 @@ public: void setWaterLevel(float waterLevel) { - const float refractionScale = std::min(1.0f,std::max(0.0f, + const float refractionScale = std::min(1.0f,std::max(0.01f, // 0.0 crashes the game Settings::Manager::getFloat("refraction scale", "Water"))); setViewMatrix(osg::Matrix::scale(1,1,refractionScale) * diff --git a/docs/source/reference/modding/settings/water.rst b/docs/source/reference/modding/settings/water.rst index aceecc630..ab87c77e5 100644 --- a/docs/source/reference/modding/settings/water.rst +++ b/docs/source/reference/modding/settings/water.rst @@ -104,4 +104,4 @@ This setting only applies if water shader is on and refractions are enabled. Not setting if off, there will still be small refractions caused by the water waves, which however do not cause such significant distortion. -TODO: setting via GUI? Interation with rttsize? +This setting can be edited with the 'Refraction scale' slider in the Water tab of the Video panel of the Options menu. diff --git a/files/mygui/openmw_settings_window.layout b/files/mygui/openmw_settings_window.layout index 8ff850cae..6e377b284 100644 --- a/files/mygui/openmw_settings_window.layout +++ b/files/mygui/openmw_settings_window.layout @@ -394,8 +394,30 @@ + + + + + + + + + + + + + + + + + + + + + + + -