From fac63e473a4b2b7b9b361c4d5656c94d47d88ef0 Mon Sep 17 00:00:00 2001
From: "Jonathan \"Geenz\" Goodman" <geenz@geenzo.com>
Date: Thu, 1 Feb 2024 12:11:20 -0800
Subject: #684 Fix pixellation on mirrors regardless of mirror resolution.

---
 indra/newview/llviewershadermgr.cpp | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

(limited to 'indra/newview/llviewershadermgr.cpp')

diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index a93d60cb70..5e9c8f5595 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -84,7 +84,8 @@ LLGLSLShader	gOcclusionCubeProgram;
 LLGLSLShader	gGlowCombineProgram;
 LLGLSLShader	gReflectionMipProgram;
 LLGLSLShader    gGaussianProgram;
-LLGLSLShader	gRadianceGenProgram;
+LLGLSLShader    gRadianceGenProgram;
+LLGLSLShader    gHeroRadianceGenProgram;
 LLGLSLShader	gIrradianceGenProgram;
 LLGLSLShader	gGlowCombineFXAAProgram;
 LLGLSLShader	gTwoTextureCompareProgram;
@@ -2799,8 +2800,21 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
         gRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenV.glsl", GL_VERTEX_SHADER));
         gRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenF.glsl", GL_FRAGMENT_SHADER));
         gRadianceGenProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE];
+        gRadianceGenProgram.addPermutation("PROBE_FILTER_SAMPLES", "32");
         success = gRadianceGenProgram.createShader(NULL, NULL);
     }
+	
+    if (success && gGLManager.mHasCubeMapArray)
+    {
+        gHeroRadianceGenProgram.mName = "Hero Radiance Gen Shader";
+        gHeroRadianceGenProgram.mShaderFiles.clear();
+        gHeroRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenV.glsl", GL_VERTEX_SHADER));
+        gHeroRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenF.glsl", GL_FRAGMENT_SHADER));
+        gHeroRadianceGenProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE];
+        gHeroRadianceGenProgram.addPermutation("HERO_PROBES", "1");
+        gHeroRadianceGenProgram.addPermutation("PROBE_FILTER_SAMPLES", "4");
+        success                              = gHeroRadianceGenProgram.createShader(NULL, NULL);
+    }
 
     if (success && gGLManager.mHasCubeMapArray)
     {
-- 
cgit v1.2.3