diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-02-18 18:30:59 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-02-18 18:30:59 +0200 |
commit | 882600de2afa366729be870355767282247be0ef (patch) | |
tree | 8c212e36e94df3b67af8a9fe1ca35ca1dabd517e | |
parent | 808684ee4fe0d9ed3868d0ee86d9cc28f32fcfcb (diff) |
SL-16627 water reflection detail settings should be affected by auto-adjustment
-rw-r--r-- | indra/newview/pipeline.cpp | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index d3936fabcf..6738532bc3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -132,7 +132,7 @@ // NOTE: Keep in sync with indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml // NOTE: Unused consts are commented out since some compilers (on macOS) may complain about unused variables. -// const S32 WATER_REFLECT_NONE_WATER_OPAQUE = -2; + const S32 WATER_REFLECT_NONE_WATER_OPAQUE = -2; const S32 WATER_REFLECT_NONE_WATER_TRANSPARENT = -1; const S32 WATER_REFLECT_MINIMAL = 0; // const S32 WATER_REFLECT_TERRAIN = 1; @@ -11510,6 +11510,13 @@ void LLPipeline::autoAdjustSettings() { S32 fps_dif = fps_lower_boundary - fps; + if (sWaterReflections && RenderReflectionDetail > WATER_REFLECT_NONE_WATER_OPAQUE) + { + S32 reflection_detail = llclamp(RenderReflectionDetail - 1, WATER_REFLECT_NONE_WATER_OPAQUE, WATER_REFLECT_MINIMAL); + gSavedSettings.setS32("RenderReflectionDetail", reflection_detail); + return; + } + if (LLPipeline::sRenderDeferred && RenderShadowDetail > 0 && RenderShadowSplits > 0) { S32 shadow_splits = llclamp(RenderShadowSplits - 1, 0, 3); @@ -11551,6 +11558,13 @@ void LLPipeline::autoAdjustSettings() { S32 shadow_splits = llclamp(RenderShadowSplits + 1, 0, 3); gSavedSettings.setS32("RenderShadowSplits", shadow_splits); + return; + } + + if (sWaterReflections && RenderReflectionDetail < WATER_REFLECT_MINIMAL) + { + S32 reflection_detail = llclamp(RenderReflectionDetail + 1, WATER_REFLECT_NONE_WATER_OPAQUE, WATER_REFLECT_MINIMAL); + gSavedSettings.setS32("RenderReflectionDetail", reflection_detail); } } } diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml index 65b96d3694..b02eb62112 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml @@ -697,6 +697,8 @@ top_delta="0" name="Reflections" width="150"> + <combo_box.mouse_down_callback + function="Pref.AutoAdjustWarning" /> <combo_box.item label="None; opaque" name="0" |