From 92efb16039619b8ac440cfc862f29b0f7c6c0fd6 Mon Sep 17 00:00:00 2001
From: RunitaiLinden <davep@lindenlab.com>
Date: Tue, 2 Apr 2024 15:27:22 -0500
Subject: #854 Fix for skies that shouldn't be auto-adjusted getting
 auto-adjusted. (#1115)

---
 indra/newview/app_settings/settings.xml  | 11 -----------
 indra/newview/llreflectionmapmanager.cpp |  3 +--
 indra/newview/llsettingsvo.cpp           |  3 +--
 3 files changed, 2 insertions(+), 15 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index a988c515ce..3ef7cb9ef7 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8828,17 +8828,6 @@
     <key>Value</key>
     <real>32.0</real>
   </map>
-  <key>RenderCloudShadowAmbianceFactor</key>
-  <map>
-    <key>Comment</key>
-    <string>Amount that cloud shadow (aka cloud coverage) contributes to reflection probe ambiance</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>0.1</real>
-  </map>
   <key>RenderCPUBasis</key>
   <map>
     <key>Comment</key>
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index f9c5421866..3e4992e4e7 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -1092,9 +1092,8 @@ void LLReflectionMapManager::updateUniforms()
     LLEnvironment& environment = LLEnvironment::instance();
     LLSettingsSky::ptr_t psky = environment.getCurrentSky();
 
-    static LLCachedControl<F32> cloud_shadow_scale(gSavedSettings, "RenderCloudShadowAmbianceFactor", 0.125f);
     static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
-    F32 minimum_ambiance = psky->getTotalReflectionProbeAmbiance(cloud_shadow_scale, should_auto_adjust);
+    F32 minimum_ambiance = psky->getReflectionProbeAmbiance(should_auto_adjust);
 
     bool is_ambiance_pass = gCubeSnapshot && !isRadiancePass();
     F32 ambscale = is_ambiance_pass ? 0.f : 1.f;
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index afae5f140b..ff9332aeee 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -745,8 +745,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
     shader->uniform1f(LLShaderMgr::SKY_SUNLIGHT_SCALE, sunlight_scale);
     shader->uniform1f(LLShaderMgr::SKY_AMBIENT_SCALE, ambient_scale);
 
-    static LLCachedControl<F32> cloud_shadow_scale(gSavedSettings, "RenderCloudShadowAmbianceFactor", 0.125f);
-    F32 probe_ambiance = getTotalReflectionProbeAmbiance(cloud_shadow_scale);
+    F32 probe_ambiance = getReflectionProbeAmbiance();
 
     if (irradiance_pass)
     { // during an irradiance map update, disable ambient lighting (direct lighting only) and desaturate sky color (avoid tinting the world blue)
-- 
cgit v1.2.3