From 2c8532bdc7afa8ff380fbae7c2be8300b5ce8214 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Fri, 12 Jan 2024 00:22:47 +0200
Subject: [PATCH] SL-20629 Fix Probe ambiance being displayed as 0 when it
 isn't

And hide warning when it's already 0
---
 indra/newview/app_settings/settings.xml     | 2 +-
 indra/newview/llfloatereditextdaycycle.cpp  | 4 +++-
 indra/newview/llfloaterfixedenvironment.cpp | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 00b59f9a4d9..8fbeb82d078 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10720,7 +10720,7 @@
     <key>Type</key>
     <string>F32</string>
     <key>Value</key>
-    <real>0.001</real>
+    <real>0.01</real>
   </map>
   <key>RenderSkySunlightScale</key>
   <map>
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index bb47feaa956..4e764674e5f 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1724,7 +1724,9 @@ void LLFloaterEditExtDayCycle::showHDRNotification(const LLSettingsDay::ptr_t &p
         while (iter != end)
         {
             LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(iter->second);
-            if (sky && sky->canAutoAdjust()) 
+            if (sky
+                && sky->canAutoAdjust()
+                && sky->getReflectionProbeAmbiance(true) != 0.f) 
             {
                 LLNotificationsUtil::add("AutoAdjustHDRSky");
                 return;
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 8e28fd6234a..3e8bad3ef58 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -186,7 +186,8 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p
     // teach user about HDR settings
     if (mSettings
         && mSettings->getSettingsType() == "sky"
-        && ((LLSettingsSky*)mSettings.get())->canAutoAdjust())
+        && ((LLSettingsSky*)mSettings.get())->canAutoAdjust()
+        && ((LLSettingsSky*)mSettings.get())->getReflectionProbeAmbiance(true) != 0.f)
     {
         LLNotificationsUtil::add("AutoAdjustHDRSky");
     }
-- 
GitLab