diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
index 3e4de8b8135f9da1ea39e7d950f55e735dcbf3cf..1bd8fee7c974949ee9e43f1f520ec441c7cc6644 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
@@ -28,7 +28,6 @@ uniform mat4 projection_matrix;
 ATTRIBUTE vec3 position;
 ATTRIBUTE vec3 normal;
 ATTRIBUTE vec2 texcoord0;
-ATTRIBUTE vec4 clothing; 
 
 mat4 getSkinnedTransform();
 
@@ -37,13 +36,6 @@ ATTRIBUTE vec4 weight;
 VARYING vec3 vary_normal;
 VARYING vec2 vary_texcoord0;
 
-uniform vec4 gWindDir;
-uniform vec4 gSinWaveParams;
-uniform vec4 gGravity;
-
-const vec4 gMinMaxConstants = vec4(1.0, 0.166666, 0.0083143, .00018542);	 // #minimax-generated coefficients
-const vec4 gPiConstants	= vec4(0.159154943, 6.28318530, 3.141592653, 1.5707963); //	# {1/2PI, 2PI, PI, PI/2}
-
 void main()
 {
 	vary_texcoord0 = texcoord0;
@@ -53,78 +45,16 @@ void main()
 	
 	vec4 pos_in = vec4(position.xyz, 1.0);
 	mat4 trans = getSkinnedTransform();
+	pos.x = dot(trans[0], pos_in);
+	pos.y = dot(trans[1], pos_in);
+	pos.z = dot(trans[2], pos_in);
+	pos.w = 1.0;
 	
 	norm.x = dot(trans[0].xyz, normal);
 	norm.y = dot(trans[1].xyz, normal);
 	norm.z = dot(trans[2].xyz, normal);
 	norm = normalize(norm);
 	
-#ifdef AVATAR_CLOTH
-	//wind
-	vec4 windEffect;
-	windEffect = vec4(dot(norm, gWindDir.xyz));	
-	pos.x = dot(trans[2], pos_in);
-	windEffect.xyz = pos.x * vec3(0.015, 0.015, 0.015)
-						+ windEffect.xyz;
-	windEffect.w = windEffect.w * 2.0 + 1.0;				// move wind offset value to [-1, 3]
-	windEffect.w = windEffect.w*gWindDir.w;					// modulate wind strength 
-	
-	windEffect.xyz = windEffect.xyz*gSinWaveParams.xyz
-						+vec3(gSinWaveParams.w);			// use sin wave params to scale and offset input
-
-	//reduce to period of 2 PI
-	vec4 temp1, temp0, temp2, offsetPos;
-	temp1.xyz = windEffect.xyz * gPiConstants.x;			// change input as multiple of [0-2PI] to [0-1]
-	temp0.y = mod(temp1.x,1.0);	
-	windEffect.x = temp0.y * gPiConstants.y;				// scale from [0,1] to [0, 2PI]
-	temp1.z = temp1.z - gPiConstants.w;						// shift normal oscillation by PI/2
-	temp0.y = mod(temp1.z,1.0);
-	
-	windEffect.z = temp0.y * gPiConstants.y;				// scale from [0,1] to [0, 2PI]
-	windEffect.xyz = windEffect.xyz + vec3(-3.141592);		// offset to [-PI, PI]
-
-	//calculate sinusoid
-	vec4 sinWave;
-	temp1 = windEffect*windEffect;
-	sinWave = -temp1 * gMinMaxConstants.w 
-				+ vec4(gMinMaxConstants.z);					// y = -(x^2)/7! + 1/5!
-	sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.y);	// y = -(x^2) * (-(x^2)/7! + 1/5!) + 1/3!
-	sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.x);	// y = -(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1
-	sinWave = sinWave * windEffect;							// y = x * (-(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1)
-	
-	// sinWave.x holds sin(norm . wind_direction) with primary frequency
-	// sinWave.y holds sin(norm . wind_direction) with secondary frequency
-	// sinWave.z hold cos(norm . wind_direction) with primary frequency
-	sinWave.xyz = sinWave.xyz * gWindDir.w 
-				+ vec3(windEffect.w);						// multiply by wind strength in gWindDir.w [-wind, wind]
-
-	// add normal facing bias offset [-wind,wind] -> [-wind - .25, wind + 1]
-	temp1 = vec4(dot(norm, gGravity.xyz));					// how much is this normal facing in direction of gGravity?
-	temp1 = min(temp1, vec4(0.2,0.0,0.0,0.0));				// clamp [-1, 1] to [-1, 0.2]
-	temp1 = temp1*vec4(1.5,0.0,0.0,0.0);					// scale from [-1,0.2] to [-1.5, 0.3]
-	sinWave.x = sinWave.x + temp1.x;						// add gGravity effect to sinwave (only primary frequency)
-	sinWave.xyz = sinWave.xyz * clothing.w;					// modulate by clothing coverage
-	
-	sinWave.xyz = max(sinWave.xyz, vec3(-1.0, -1.0, -1.0));	// clamp to underlying body shape
-	offsetPos = clothing * sinWave.x;						// multiply wind effect times clothing displacement
-	temp2 = gWindDir*sinWave.z + vec4(norm,0);				// calculate normal offset due to wind oscillation
-	offsetPos = vec4(1.0,1.0,1.0,0.0)*offsetPos+pos_in;		// add to offset vertex position, and zero out effect from w
-	norm += temp2.xyz*2.0;									// add sin wave effect on normals (exaggerated)
-
-	//renormalize normal (again)
-	norm = normalize(norm);
-
-	pos.x = dot(trans[0], offsetPos);
-	pos.y = dot(trans[1], offsetPos);
-	pos.z = dot(trans[2], offsetPos);
-	pos.w = 1.0;
-#else
-	pos.x = dot(trans[0], pos_in);
-	pos.y = dot(trans[1], pos_in);
-	pos.z = dot(trans[2], pos_in);
-	pos.w = 1.0;
-#endif
-
 	vary_normal = norm;
 	
 	gl_Position = projection_matrix * pos;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl
index 49b24678ae8e74fe9664e0aade1b6b39be8ed3ab..0e461b400480f7aec3b753364c69e66e921130f7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl
@@ -32,6 +32,10 @@ uniform mat4 modelview_projection_matrix;
 
 void calcAtmospherics(vec3 inPositionEye);
 
+uniform vec4 origin;
+
+
+
 ATTRIBUTE vec3 position;
 void passTextureIndex();
 ATTRIBUTE vec3 normal;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/genbrdflutV.glsl b/indra/newview/app_settings/shaders/class1/deferred/genbrdflutV.glsl
index 2a1c6c4091cb40635f6e4c2531c6b1aeb561ca28..682244478bd7e3467cbbf1fcbc4ac3069de92481 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/genbrdflutV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/genbrdflutV.glsl
@@ -1,17 +1,9 @@
 /** 
-<<<<<<<< HEAD:indra/newview/app_settings/shaders/class1/alchemy/postNoTCV.glsl
- * @file postNoTCV.glsl
- *
- * $LicenseInfo:firstyear=2021&license=viewerlgpl$
- * Alchemy Viewer Source Code
- * Copyright (C) 2021, Rye Mutt<rye@alchemyviewer.org>
-========
  * @file class3\deferred\genbrdflutV.glsl
  *
  * $LicenseInfo:firstyear=2022&license=viewerlgpl$
  * Second Life Viewer Source Code
  * Copyright (C) 2022, Linden Research, Inc.
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/deferred/genbrdflutV.glsl
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -27,6 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  * 
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
 
@@ -34,25 +27,13 @@ uniform mat4 modelview_projection_matrix;
 
 ATTRIBUTE vec3 position;
 
-<<<<<<<< HEAD:indra/newview/app_settings/shaders/class1/alchemy/postNoTCV.glsl
-VARYING vec2 vary_fragcoord;
-
-uniform vec2 screen_res = vec2(1.f, 1.f);
-========
 VARYING vec2 vary_uv;
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/deferred/genbrdflutV.glsl
 
 void main()
 {
 	//transform vertex
 	vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
-<<<<<<<< HEAD:indra/newview/app_settings/shaders/class1/alchemy/postNoTCV.glsl
-	gl_Position = pos;
-
-	vary_fragcoord = (pos.xy*0.5+0.5) * screen_res;
-========
 	vary_uv = position.xy*0.5+0.5;
 
 	gl_Position = vec4(position.xyz, 1.0);
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/deferred/genbrdflutV.glsl
 }
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl
index 4ada102582d6d7f7d882c32e4d4eac20d65aba56..a1cab87092a1b1508a3f961eda2933ed1b893d82 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl
@@ -39,10 +39,6 @@ uniform mat4 modelview_projection_matrix;
 
 #if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
 
-// forwards
-void setAtmosAttenuation(vec3 c);
-void setAdditiveColor(vec3 c);
-
 #if !defined(HAS_SKIN)
 uniform mat4 modelview_matrix;
 #endif
@@ -115,7 +111,7 @@ void main()
 	vec3 n = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz);
 #ifdef HAS_NORMAL_MAP
 	vec3 t = normalize((mat*vec4(tangent.xyz+position.xyz,1.0)).xyz-pos.xyz);
-	vec3 b = normalize(cross(n, t)*tangent.w);
+	vec3 b = cross(n, t)*tangent.w;
 	
 	vary_mat0 = vec3(t.x, b.x, n.x);
 	vary_mat1 = vec3(t.y, b.y, n.y);
@@ -127,7 +123,7 @@ vary_normal  = n;
 	vec3 n = normalize(normal_matrix * normal);
 #ifdef HAS_NORMAL_MAP
 	vec3 t = normalize(normal_matrix * tangent.xyz);
-	vec3 b = normalize(cross(n,t)*tangent.w);
+	vec3 b = cross(n,t)*tangent.w;
 	//vec3 t = cross(b,n) * binormal.w;
 	
 	vary_mat0 = vec3(t.x, b.x, n.x);
@@ -141,10 +137,6 @@ vary_normal  = n;
 	vertex_color = diffuse_color;
 
 #if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
-    // appease OSX GLSL compiler/linker by touching all the varyings we said we would
-    setAtmosAttenuation(vec3(1));
-    setAdditiveColor(vec3(0));
-
 #if !defined(HAS_SKIN)
 	vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz;
 #endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl
index 2234d042b3cb5ec68d6386fc5c400b6c86b9e164..2ccd3fd962914c51744b45b1ff497ebd60d1bc99 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl
@@ -1,12 +1,3 @@
-<<<<<<<< HEAD:indra/newview/algamemode.h
-/**
- * @file algamemode.h
- * @brief Support for FeralInteractive's GameMode
- *
- * $LicenseInfo:firstyear=2021&license=viewerlgpl$
- * Copyright (C) 2021, XenHat <me@xenh.at>
- *
-========
 /** 
  * @file pbralphaF.glsl
  *
@@ -14,45 +5,24 @@
  * Second Life Viewer Source Code
  * Copyright (C) 2023, Linden Research, Inc.
  * 
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- *
+ * 
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- *
+ * 
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ * 
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
 
-<<<<<<<< HEAD:indra/newview/algamemode.h
-#ifndef AL_GAMEMODE_H
-#define AL_GAMEMODE_H
-
-class ALGameMode final
-{
-
-public:
-	static ALGameMode &instance();
-
-	void enable(bool enable);
-	void init();
-	static void shutdown();
-
-protected:
-	void onToggleGameModeControl();
-	bool mEnabled = false;
-	short mStatus = 0;
-};
-
-#endif // AL_GAMEMODE_H
-========
  // debug stub
 
 out vec4 frag_color;
@@ -61,4 +31,3 @@ void main()
 {
     frag_color = vec4(1.0, 0, 0.5, 0.5);
 }
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl
diff --git a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
index 259513b0c228470c7cf4e9028693e99c9a4e961a..d054305767d0361a3ad48d0c731c94d1876833be 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
@@ -1,19 +1,9 @@
 /**
-<<<<<<<< HEAD:indra/newview/alpanelradaralert.h
- * @file alpanelonlinestatus.h
- * @brief Radar alert tip toasts
-========
  * @file class3/deferred/screenSpaceReflUtil.glsl
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
  *
- * $LicenseInfo:firstyear=2010&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
  * Second Life Viewer Source Code
-<<<<<<<< HEAD:indra/newview/alpanelradaralert.h
- * Copyright (C) 2010, Linden Research, Inc.
- * COpyright (C) 2014, Cinder Roxley
-========
  * Copyright (C) 2007, Linden Research, Inc.
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -33,28 +23,6 @@
  * $/LicenseInfo$
  */
 
-<<<<<<<< HEAD:indra/newview/alpanelradaralert.h
-#ifndef LL_PANELRADARALERT_H
-#define LL_PANELRADARALERT_H
-
-#include "llpaneltiptoast.h"
-
-/**
- * Represents radar alert toast panel.
- */
-class ALPanelRadarAlert final : public LLPanelTipToast
-{
-	// disallow instantiation of this class
-private:
-	// grant privileges to instantiate this class to LLToastPanel
-	friend class LLToastPanel;
-	
-	ALPanelRadarAlert(const LLNotificationPtr& notification);
-	virtual ~ALPanelRadarAlert() = default;
-};
-
-#endif // LL_PANELRADARALERT_H
-========
 // debug stub
 
 float random (vec2 uv) 
@@ -67,4 +35,3 @@ float tapScreenSpaceReflection(int totalSamples, vec2 tc, vec3 viewPos, vec3 n,
     collectedColor = vec4(0);
     return 0;
 }
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl
index f5f7bf92b328edabacdbd4e865f75c57d770efd1..ee3a5f1f3131c713f07bfe1e75f34dbe1a63e240 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl
@@ -81,7 +81,8 @@ float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float bias_scale, vec2
     float cs = texture(shadowMap, stc.xyz);
     float shadow = cs;
 
-    vec2 off = vec2(1.0, 1.5) / proj_shadow_res.xy;
+    vec2 off = 1.0/proj_shadow_res;
+    off.y *= 1.5;
     
     shadow += texture(shadowMap, stc.xyz+vec3(off.x*2.0, off.y, 0.0));
     shadow += texture(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0));
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
index 89fd60aca45092dac3f241e340d9e82403b16e25..d6c14c48c9384c576c55f6ce27fb3536cc5aac01 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
@@ -37,6 +37,7 @@ uniform sampler2D detail_2;
 uniform sampler2D detail_3;
 uniform sampler2D alpha_ramp;
 
+VARYING vec3 pos;
 VARYING vec3 vary_normal;
 VARYING vec4 vary_texcoord0;
 VARYING vec4 vary_texcoord1;
@@ -60,7 +61,7 @@ void main()
     outColor.a = 0.0; // yes, downstream atmospherics 
     
     frag_data[0] = outColor;
-    frag_data[1] = vec4(0.0,0.0,0.0,0.0);
+    frag_data[1] = vec4(0.0,0.0,0.0,-1.0);
     vec3 nvn = normalize(vary_normal);
     frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, GBUFFER_FLAG_HAS_ATMOS);
 }
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
index 7f63b86f87abd2b7c010e594c2ce92ddf5b2bef6..f42cb6ff6dbaf637be15ad99c6d857a281347333 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
@@ -33,6 +33,7 @@ ATTRIBUTE vec4 diffuse_color;
 ATTRIBUTE vec2 texcoord0;
 ATTRIBUTE vec2 texcoord1;
 
+VARYING vec3 pos;
 VARYING vec3 vary_normal;
 VARYING vec4 vary_texcoord0;
 VARYING vec4 vary_texcoord1;
@@ -57,7 +58,11 @@ vec4 texgen_object(vec4  vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
 void main()
 {
     //transform vertex
-    gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+    vec4 pre_pos = vec4(position.xyz, 1.0);
+    vec4 t_pos = modelview_projection_matrix * pre_pos;
+
+    gl_Position = t_pos;
+    pos = t_pos.xyz;
 
     vary_normal = normalize(normal_matrix * normal);
     
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
index 83c4cd5de02cd4f4bfcde90720aabe52d8b3e0ed..4e535f7e18e24267eccbe978bde3316b141ed897 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
@@ -49,8 +49,8 @@ void main()
 	/// http://en.wikipedia.org/wiki/Luma_%28video%29
 	float lum = smoothstep(minLuminance, minLuminance+1.0, dot(col.rgb, lumWeights ) );
 	float warmth = smoothstep(minLuminance, minLuminance+1.0, max(col.r * warmthWeights.r, max(col.g * warmthWeights.g, col.b * warmthWeights.b)) ); 
-
-	frag_color.rgb = max(col.rgb, vec3(0)); 
+	
+	frag_color.rgb = col.rgb; 
 	frag_color.a = max(col.a, mix(lum, warmth, warmthAmount) * maxExtractAlpha);
 	
 }
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
index 29f51219b01e802307db7a2c723689fe3a526a9e..c1f6af9f577127be6addddad531dfb91173f3f2f 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
@@ -56,5 +56,5 @@ void main()
 	col += kern[6] * texture2D(diffuseMap, vary_texcoord2.zw);	
 	col += kern[7] * texture2D(diffuseMap, vary_texcoord3.zw);	
 	
-	frag_color = vec4(max(col.rgb, vec3(0)) * glowStrength, col.a);
+	frag_color = vec4(col.rgb * glowStrength, col.a);
 }
diff --git a/indra/newview/app_settings/shaders/class1/environment/encodeNormF.glsl b/indra/newview/app_settings/shaders/class1/environment/encodeNormF.glsl
index 20e68fae2596df21b0be42ee51586ad25bd5e76d..6cd24455228f402580f9e9d068400b4d935728c6 100644
--- a/indra/newview/app_settings/shaders/class1/environment/encodeNormF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/encodeNormF.glsl
@@ -23,20 +23,12 @@
  * $/LicenseInfo$
  */
 
- // Octahedron normal vector encoding
- // https://knarkowicz.wordpress.com/2014/04/16/octahedron-normal-vector-encoding/
- //
-
-vec2 OctWrap( vec2 v )
-{
-    return ( 1.0 - abs( v.yx ) ) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0); 
-}
-
+// Lambert Azimuthal Equal-Area projection
+// See: https://aras-p.info/texts/CompactNormalStorage.html
+// Also see: A_bit_more_deferred_-_CryEngine3.ppt
 vec2 encode_normal(vec3 n)
 {
-    n /= ( abs( n.x ) + abs( n.y ) + abs( n.z ) );
-    n.xy = n.z >= 0.0 ? n.xy : OctWrap( n.xy );
-    n.xy = n.xy * 0.5 + 0.5;
-    return n.xy;
+	float f = sqrt(8 * n.z + 8);
+	return n.xy / f + 0.5;
 }
 
diff --git a/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl b/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl
index 972016076372e23c56f630bbbe3156309be2b3e6..4a8b892c3ae99a5fd3aa313f419bf72bbb2f4d7e 100644
--- a/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl
@@ -43,6 +43,7 @@ vec3 srgb_to_linear(vec3 cs)
 
 vec3 linear_to_srgb(vec3 cl)
 {
+	cl = clamp(cl, vec3(0), vec3(1));
 	vec3 low_range  = cl * 12.92;
 	vec3 high_range = 1.055 * pow(cl, vec3(0.41666)) - 0.055;
 	bvec3 lt = lessThan(cl,vec3(0.0031308));
diff --git a/indra/newview/app_settings/shaders/class1/interface/gaussianF.glsl b/indra/newview/app_settings/shaders/class1/interface/gaussianF.glsl
index bb45cd4fed2b2607d8467a54a2df365ac27643dd..188fac54601e71a4be06e5cc9908ef284142dca9 100644
--- a/indra/newview/app_settings/shaders/class1/interface/gaussianF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/gaussianF.glsl
@@ -1,19 +1,9 @@
 /** 
-<<<<<<<< HEAD:indra/media_plugins/cef/dummy_volume_catcher.cpp
- * @file dummy_volume_catcher.cpp
- * @brief A null implementation of the "VolumeCatcher" class for platforms where it's not implemented yet.
- *
- * @cond
- * $LicenseInfo:firstyear=2010&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
-========
  * @file gaussianF.glsl
  *
  * $LicenseInfo:firstyear=2023&license=viewerlgpl$
  * Second Life Viewer Source Code
  * Copyright (C) 2023, Linden Research, Inc.
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/interface/gaussianF.glsl
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -31,39 +21,8 @@
  * 
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
- * @endcond
  */
 
-<<<<<<<< HEAD:indra/media_plugins/cef/dummy_volume_catcher.cpp
-#include "volume_catcher.h"
-
-
-class VolumeCatcherImpl
-{
-};
-
-/////////////////////////////////////////////////////
-
-VolumeCatcher::VolumeCatcher()
-{
-	pimpl = NULL;
-}
-
-VolumeCatcher::~VolumeCatcher()
-{
-}
-
-void VolumeCatcher::setVolume(F32 volume)
-{
-}
-
-void VolumeCatcher::setPan(F32 pan)
-{
-}
-
-void VolumeCatcher::pump()
-{
-========
 out vec4 frag_color;
 
 uniform sampler2D diffuseRect;
@@ -91,5 +50,4 @@ void main()
     }
 
     frag_color = vec4(col, 0.0);
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/interface/gaussianF.glsl
 }
diff --git a/indra/newview/app_settings/shaders/class1/interface/radianceGenV.glsl b/indra/newview/app_settings/shaders/class1/interface/radianceGenV.glsl
index 71e453a51226f2fe58db4f7eb5095a7b6caff2f6..5f5d9396ff917a0f37780342a5ab68aee378a338 100644
--- a/indra/newview/app_settings/shaders/class1/interface/radianceGenV.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/radianceGenV.glsl
@@ -1,13 +1,3 @@
-<<<<<<<< HEAD:indra/newview/llfloaternewlocalinventory.h
-/**
- * @file llfloaternewlocalinventory.h
- * @brief Create fake local inventory item
- *
- * $LicenseInfo:firstyear=2022&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2022, Cinder Roxley
- *
-========
 /** 
  * @file radianceGenV.glsl
  *
@@ -15,37 +5,26 @@
  * Second Life Viewer Source Code
  * Copyright (C) 2011, Linden Research, Inc.
  * 
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/interface/radianceGenV.glsl
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- *
+ * 
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- *
+ * 
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
+ * 
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
 
-#include "llfloater.h"
+uniform mat4 modelview_matrix;
 
-<<<<<<<< HEAD:indra/newview/llfloaternewlocalinventory.h
-class LLLineEditor;
-
-class LLFloaterNewLocalInventory
-:	public LLFloater
-{
-public:
-	LLFloaterNewLocalInventory(const LLSD& key);
-	BOOL postBuild() override;
-========
 ATTRIBUTE vec3 position;
 
 VARYING vec3 vary_dir;
@@ -56,11 +35,4 @@ void main()
 
 	vary_dir = vec3(modelview_matrix * vec4(position, 1.0)).xyz;
 }
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class1/interface/radianceGenV.glsl
-
-	void onClickOK();
-	static LLUUID sLastCreatorId;
 
-private:
-    ~LLFloaterNewLocalInventory() override = default;
-};
diff --git a/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl b/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl
index 11f4f51395026324e2bb40bf27cf41fa69b6d76c..6eeb2596b2e1b99a1df7caa6ac7f0530236c8984 100644
--- a/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl
@@ -46,7 +46,7 @@ void main()
 	vec2 dither_coord;
 	dither_coord[0] = vary_texcoord0[0] * dither_scale_s;
 	dither_coord[1] = vary_texcoord0[1] * dither_scale_t;
-	vec4 dither_vec = texture2D(dither_tex, dither_coord.xy);
+	vec4 dither_vec = texture(dither_tex, dither_coord.xy);
 
 	for(int i = 0; i < 3; i++)
 	{
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
index 7271865596f0caa79c5553ccf0c506382f5ff204..b2c83a0f4436603ae0a08c95b9aedfa6c547900e 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
@@ -46,7 +46,7 @@ void default_lighting()
 		discard;
 	}
 	
-	color.rgb *= vertex_color.rgb;
+	color *= vertex_color;
 
 	color.rgb = atmosLighting(color.rgb);
 	color.rgb = scaleSoftClip(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
index dd1cea3dafdaeb70deee5b169c164a6097993757..d87403c78ff86e859c0311088ef52462bfa4d5b0 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
@@ -47,8 +47,8 @@ void default_lighting()
 	{
 		discard;
 	}
-	
-	color.rgb *= vertex_color.rgb;
+
+	color *= vertex_color;
 
 	color.rgb = atmosLighting(color.rgb);
 
diff --git a/indra/newview/app_settings/shaders/class2/interface/reflectionprobeF.glsl b/indra/newview/app_settings/shaders/class2/interface/reflectionprobeF.glsl
index 4783933b4dea9ab776460e77f3daf99aefb01fc9..986b233e0beadc735fcc5e121831a49ba2ef538d 100644
--- a/indra/newview/app_settings/shaders/class2/interface/reflectionprobeF.glsl
+++ b/indra/newview/app_settings/shaders/class2/interface/reflectionprobeF.glsl
@@ -1,12 +1,3 @@
-<<<<<<<< HEAD:indra/llimage/llimagewebp.h
-/*
- * @file llimagewebp.h
- *
- * $LicenseInfo:firstyear=2020&license=viewerlgpl$
- * Alchemy Viewer Source Code
- * Copyright (C) 2020, Rye Mutt <rye@alchemyviewer.org>
- *
-========
 /** 
  * @file reflectionprobeF.glsl
  *
@@ -14,47 +5,24 @@
  * Second Life Viewer Source Code
  * Copyright (C) 2022, Linden Research, Inc.
  * 
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class2/interface/reflectionprobeF.glsl
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- *
+ * 
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- *
+ * 
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
+ * 
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
 
-<<<<<<<< HEAD:indra/llimage/llimagewebp.h
-#ifndef AL_ALIMAGEWEBP_H
-#define AL_ALIMAGEWEBP_H
-
-#include "stdtypes.h"
-#include "llimage.h"
-
-class LLImageWebP final : public LLImageFormatted
-{
-protected:
-	~LLImageWebP() = default;
-
-public:
-    LLImageWebP();
-
-	/*virtual*/ std::string getExtension() { return std::string("webp"); }
-	/*virtual*/ bool updateData();
-	/*virtual*/ bool decode(LLImageRaw* raw_image, F32 decode_time);
-	/*virtual*/ bool encode(const LLImageRaw* raw_image, F32 encode_time);
-};
-
-#endif
-========
 out vec4 frag_color;
 
 in vec2 vary_fragcoord;
@@ -72,4 +40,3 @@ void main()
 
     frag_color = sampleReflectionProbesDebug(pos.xyz);
 }
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class2/interface/reflectionprobeF.glsl
diff --git a/indra/newview/app_settings/shaders/class2/interface/reflectionprobeV.glsl b/indra/newview/app_settings/shaders/class2/interface/reflectionprobeV.glsl
index 9e6cc391d78b064d4450b317a722f81cf3c653f4..e45b1c288b11333267970c3bb3a66ec57167ccee 100644
--- a/indra/newview/app_settings/shaders/class2/interface/reflectionprobeV.glsl
+++ b/indra/newview/app_settings/shaders/class2/interface/reflectionprobeV.glsl
@@ -1,13 +1,3 @@
-<<<<<<<< HEAD:indra/newview/alpanelquicksettingspulldown.h
-/**
- * @file alpanelquicksettingspulldown.h
- * @brief Quick Settings popdown panel
- *
- * $LicenseInfo:firstyear=2013&license=viewerlgpl$
- * Alchemy Viewer Source Code
- * Copyright (C) 2013-2014, Alchemy Viewer Project.
- *
-========
 /** 
  * @file reflectionprobeV.glsl
  *
@@ -15,51 +5,34 @@
  * Second Life Viewer Source Code
  * Copyright (C) 2011, Linden Research, Inc.
  * 
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class2/interface/reflectionprobeV.glsl
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- *
+ * 
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- *
+ * 
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
+ * 
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
 
-<<<<<<<< HEAD:indra/newview/alpanelquicksettingspulldown.h
-#ifndef AL_ALPANELQUICKSETTINGSPULLDOWN_H
-#define AL_ALPANELQUICKSETTINGSPULLDOWN_H
-
-#include "llpanelpulldown.h"
-
-class LLFrameTimer;
-========
  
 in vec3 position;
 
 out vec2 vary_fragcoord;
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class2/interface/reflectionprobeV.glsl
 
-class ALPanelQuickSettingsPulldown final : public LLPanelPulldown
+void main()
 {
-<<<<<<<< HEAD:indra/newview/alpanelquicksettingspulldown.h
-public:
-	ALPanelQuickSettingsPulldown();
-};
-
-#endif // AL_ALPANELQUICKSETTINGSPULLDOWN_H
-========
     //transform vertex
     vec4 pos = vec4(position.xyz, 1.0);
     gl_Position = pos; 
 
     vary_fragcoord = (pos.xy*0.5+0.5);
 }
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/class2/interface/reflectionprobeV.glsl
diff --git a/indra/newview/app_settings/shaders/errorF.glsl b/indra/newview/app_settings/shaders/errorF.glsl
index 7cd6848a1f1ecf1b1c4afe38bce612b1416f333e..573bb5887b8a64fdb20205446855bb678434fb6e 100644
--- a/indra/newview/app_settings/shaders/errorF.glsl
+++ b/indra/newview/app_settings/shaders/errorF.glsl
@@ -1,13 +1,3 @@
-<<<<<<<< HEAD:indra/newview/llfloaterpublishclassified.h
-/**
- * @file llfloaterpublishclassified.h
- * @brief Publish classified floater
- *
- * $LicenseInfo:firstyear=2004&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
-========
 /** 
  * @file errorF.glsl
  *
@@ -15,55 +5,30 @@
  * Second Life Viewer Source Code
  * Copyright (C) 2023, Linden Research, Inc.
  * 
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/errorF.glsl
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- *
+ * 
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- *
+ * 
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
+ * 
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
 
-<<<<<<<< HEAD:indra/newview/llfloaterpublishclassified.h
-
-#ifndef LL_PUBLISHCLASSIFIEDFLOATER_H
-#define LL_PUBLISHCLASSIFIEDFLOATER_H
-
-#include "llfloater.h"
-========
  // error fallback on compilation failure
 
 out vec4 frag_color;
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/errorF.glsl
 
-class LLFloaterPublishClassified final : public LLFloater
+void main()
 {
-<<<<<<<< HEAD:indra/newview/llfloaterpublishclassified.h
-public:
-    LLFloaterPublishClassified(const LLSD& key);
-    ~LLFloaterPublishClassified() override = default;
-========
     frag_color = vec4(1,0,1,1);
 }
->>>>>>>> 2020201ba6890feb9a31168c40e1ed14727fa719:indra/newview/app_settings/shaders/errorF.glsl
-
-    BOOL postBuild() override;
-
-    void setPrice(S32 price);
-    S32 getPrice();
-
-    void setPublishClickedCallback(const commit_signal_t::slot_type& cb);
-    void setCancelClickedCallback(const commit_signal_t::slot_type& cb);
-};
 
-#endif // LL_PUBLISHCLASSIFIEDFLOATER_H