From 4e65fefbd8e1e3d558e1e285543905122063ab9c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 4 Jun 2024 11:23:45 -0400
Subject: [PATCH] Fix rendering artifacts

---
 .../app_settings/shaders/class1/deferred/deferredUtil.glsl    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
index 15147c87281..e329023a8a1 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
@@ -145,7 +145,9 @@ vec2 getScreenCoordinate(vec2 screenpos)
 
 vec4 getNorm(vec2 screenpos)
 {
-    return texture(normalMap, screenpos.xy);
+    vec4 norm = texture(normalMap, screenpos.xy);
+    norm.xyz = normalize(norm.xyz);
+    return norm;
 }
 
 // return packedNormalEnvIntensityFlags since GBUFFER_FLAG_HAS_PBR needs .w
-- 
GitLab