From 70bdf55439a57116cbd2c9bb32e78a8ada251d78 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Thu, 30 Mar 2023 16:24:04 -0500
Subject: [PATCH] SL-19517 Followup -- fix broken fallback probe.  Adjust water
 brightness.

---
 .../app_settings/shaders/class3/deferred/reflectionProbeF.glsl  | 2 +-
 indra/newview/llreflectionmapmanager.cpp                        | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
index ec7a2f4768a..94c40b1fa03 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
@@ -676,7 +676,7 @@ void sampleReflectionProbesWater(inout vec3 ambenv, inout vec3 glossenv,
     sampleReflectionProbes(ambenv, glossenv, tc, pos, norm, glossiness);
 
     // fudge factor to get PBR water at a similar luminance ot legacy water
-    glossenv *= 0.25;
+    glossenv *= 0.5;
 }
 
 void debugTapRefMap(vec3 pos, vec3 dir, float depth, int i, inout vec4 col)
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index 624eead68e3..09ac7e57a4e 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -1043,6 +1043,8 @@ void LLReflectionMapManager::initReflectionMaps()
         {
             is_free = true;
         }
+
+        mCubeFree[0] = false;
     }
 
     if (mVertexBuffer.isNull())
-- 
GitLab