diff options
author | Dave Parks <davep@lindenlab.com> | 2022-12-06 09:59:30 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-12-06 09:59:30 -0600 |
commit | c489481ec5edd0470553eca9b7c4cecfe994926c (patch) | |
tree | 4f93b57597f0d0864e23216abe753e531623906e /indra/newview | |
parent | 3ec5110129ffd29d8e76eb82e31da7470e281503 (diff) |
SL-18785 Fix for corrupt reflection probes on various preference changes. Add UI for Screen Space Reflections.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 14 | ||||
-rw-r--r-- | indra/newview/featuretable.txt | 20 | ||||
-rw-r--r-- | indra/newview/featuretable_mac.txt | 17 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 2 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml | 42 |
8 files changed, 91 insertions, 26 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index bea54f0b69..cdfb7ab71b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10327,7 +10327,8 @@ <key>Value</key> <integer>1</integer> </map> - <key>RenderReflectionDetail</key> + + <key>RenderReflectionDetail</key> <map> <key>Comment</key> <string>DEPRECATED -- use RenderTransparentWater and RenderReflectionProbeDetail -- Detail of reflection render pass.</string> @@ -10349,6 +10350,17 @@ <key>Value</key> <integer>2</integer> </map> + <key>RenderReflectionsEnabled</key> + <map> + <key>Comment</key> + <string>Enable/disable reflection probes</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>RenderReflectionProbeDetail</key> <map> <key>Comment</key> diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index aedba9b49a..14819ac5e9 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -1,4 +1,4 @@ -version 41 +version 42 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -47,7 +47,8 @@ RenderMaxPartCount 1 8192 RenderObjectBump 1 1 RenderLocalLights 1 1 RenderTransparentWater 1 1 -RenderReflectionProbeDetail 1 2 +RenderReflectionsEnabled 1 1 +RenderReflectionProbeDetail 1 2 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 2.0 RenderTreeLODFactor 1 1.0 @@ -90,7 +91,8 @@ RenderGlowResolutionPow 1 8 RenderLocalLights 1 0 RenderMaxPartCount 1 0 RenderTransparentWater 1 0 -RenderReflectionProbeDetail 1 -1 +RenderReflectionsEnabled 1 0 +RenderReflectionProbeDetail 1 0 RenderTerrainDetail 1 0 RenderTerrainLODFactor 1 1 RenderTreeLODFactor 1 0 @@ -115,7 +117,8 @@ RenderGlowResolutionPow 1 8 RenderMaxPartCount 1 2048 RenderLocalLights 1 1 RenderTransparentWater 1 0 -RenderReflectionProbeDetail 1 -1 +RenderReflectionsEnabled 1 0 +RenderReflectionProbeDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 1.0 RenderTreeLODFactor 1 0.5 @@ -149,6 +152,7 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 0 // @@ -174,6 +178,7 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 // @@ -199,6 +204,7 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 // @@ -224,6 +230,7 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 2 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 // @@ -249,6 +256,7 @@ RenderDeferredSSAO 1 1 RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 2 RenderFSAASamples 1 2 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 // @@ -288,4 +296,6 @@ RenderGLContextCoreProfile 1 0 list GL3 RenderFSAASamples 0 0 -RenderReflectionProbeDetail 0 -1 +RenderReflectionsEnabled 0 0 +RenderReflectionProbeDetail 0 0 + diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index d40e7aff0b..621499de2e 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 41 +version 42 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -71,6 +71,7 @@ RenderFSAASamples 1 16 RenderMaxTextureIndex 1 16 RenderGLContextCoreProfile 1 1 RenderGLMultiThreaded 1 0 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 2 // @@ -97,7 +98,8 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 -RenderReflectionProbeDetail 1 -1 +RenderReflectionsEnabled 1 0 +RenderReflectionProbeDetail 1 0 // // Medium Low Graphics Settings @@ -122,7 +124,8 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 -RenderReflectionProbeDetail 1 -1 +RenderReflectionsEnabled 1 0 +RenderReflectionProbeDetail 1 0 // // Medium Graphics Settings (standard) @@ -147,6 +150,7 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 0 // @@ -172,6 +176,7 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 0 // @@ -197,6 +202,7 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 // @@ -222,6 +228,7 @@ RenderShadowDetail 1 2 RenderUseAdvancedAtmospherics 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 // @@ -247,6 +254,7 @@ RenderDeferredSSAO 1 1 RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 2 RenderFSAASamples 1 2 +RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 // @@ -291,4 +299,5 @@ RenderFSAASamples 1 0 list GL3 RenderFSAASamples 0 0 -RenderReflectionProbeDetail 0 -1 +RenderReflectionProbeDetail 0 0 +RenderReflectionsEnabled 0 0 diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 81b3c23417..4c8b4df0b6 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1220,10 +1220,19 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() getChildView("fsaa")->setEnabled(FALSE); } - if (!LLFeatureManager::instance().isFeatureAvailable("RenderReflectionProbeDetail")) + enabled = false; + if (!LLFeatureManager::instance().isFeatureAvailable("RenderReflectionsEnabled")) { - getChildView("ReflectionDetail")->setEnabled(FALSE); + getChildView("ReflectionsEnabled")->setEnabled(FALSE); } + else + { + enabled = gSavedSettings.getBOOL("RenderReflectionsEnabled"); + } + + getChildView("ReflectionDetail")->setEnabled(enabled); + getChildView("ReflectionDetailText")->setEnabled(enabled); + getChildView("ScreenSpaceReflections")->setEnabled(enabled); // Hardware settings diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 0c9324cc42..534f3413b3 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -724,6 +724,7 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderResolutionDivisor", handleRenderResolutionDivisorChanged); // DEPRECATED - setting_setup_signal_listener(gSavedSettings, "RenderDeferred", handleRenderDeferredChanged); setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeDetail", handleReflectionProbeDetailChanged); + setting_setup_signal_listener(gSavedSettings, "RenderReflectionsEnabled", handleReflectionProbeDetailChanged); setting_setup_signal_listener(gSavedSettings, "RenderShadowDetail", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderDeferredSSAO", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderPerformanceTest", handleRenderPerfTestChanged); diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index a742264801..408e60595c 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -912,7 +912,7 @@ std::string LLViewerShaderMgr::loadBasicShaders() ch = llmax(LLGLSLShader::sIndexedTextureChannels, 1); } - bool has_reflection_probes = gSavedSettings.getS32("RenderReflectionProbeDetail") >= 0 && gGLManager.mGLVersion > 3.99f; + bool has_reflection_probes = gSavedSettings.getBOOL("RenderReflectionsEnabled") && gGLManager.mGLVersion > 3.99f; std::vector<S32> index_channels; index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsVarsF.glsl", mShaderLevel[SHADER_WINDLIGHT] ) ); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index fa46b0f02a..b41a02d491 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -410,7 +410,7 @@ void LLPipeline::init() sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); - mInitialized = true; + mInitialized = true; stop_glerror(); @@ -1019,8 +1019,6 @@ void LLPipeline::updateRenderBump() void LLPipeline::updateRenderDeferred() { sRenderPBR = sRenderDeferred; - static LLCachedControl<S32> sProbeDetail(gSavedSettings, "RenderReflectionProbeDetail", -1); - sReflectionProbesEnabled = sProbeDetail >= 0 && gGLManager.mGLVersion > 3.99f; } // static @@ -1112,7 +1110,9 @@ void LLPipeline::refreshCachedSettings() CameraDoFResScale = gSavedSettings.getF32("CameraDoFResScale"); RenderAutoHideSurfaceAreaLimit = gSavedSettings.getF32("RenderAutoHideSurfaceAreaLimit"); RenderScreenSpaceReflections = gSavedSettings.getBOOL("RenderScreenSpaceReflections"); + sReflectionProbesEnabled = gSavedSettings.getBOOL("RenderReflectionsEnabled"); RenderSpotLight = nullptr; + updateRenderDeferred(); if (gNonInteractive) @@ -7397,8 +7397,6 @@ void LLPipeline::doResetVertexBuffers(bool forced) LLVOPartGroup::destroyGL(); gGL.resetVertexBuffer(); - mReflectionMapManager.cleanup(); - SUBSYSTEM_CLEANUP(LLVertexBuffer); if (LLVertexBuffer::sGLCount != 0) 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 75b50c0e39..8ce365878a 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 @@ -647,32 +647,58 @@ name="2" value="2"/> </combo_box> + + <check_box + control_name="RenderReflectionsEnabled" + height="16" + initial_value="true" + label="Reflections (requires restart)" + layout="topleft" + left="420" + name="ReflectionsEnabled" + top_delta="16" + width="240"> + <check_box.commit_callback + function="Pref.RenderOptionUpdate" /> + </check_box> + + <check_box + control_name="RenderScreenSpaceReflections" + height="16" + initial_value="true" + label="Screen Space Reflections" + layout="topleft" + left="440" + name="ScreenSpaceReflections" + top_delta="16" + width="240"> + <check_box.commit_callback + function="Pref.RenderOptionUpdate" /> + </check_box> + <text type="string" length="1" follows="left|top" height="16" layout="topleft" - left="420" - name="RenderReflectionDetailText" + left="440" + name="ReflectionDetailText" text_readonly_color="LabelDisabledColor" top_delta="16" width="128"> - Reflections: + Reflection Detail: </text> + <combo_box control_name="RenderReflectionProbeDetail" height="18" layout="topleft" - left_delta="130" + left_delta="110" top_delta="0" name="ReflectionDetail" width="150"> <combo_box.item - label="Disabled" - name="0" - value="-1"/> - <combo_box.item label="Static Only" name="0" value="0"/> |