diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index 34bd4a7e21d22dca1d825f899fe513304c4ebf97..c08e9d361af6b3f6a1b5ba6332b24151431685c9 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -127,13 +127,17 @@ vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
 	vec4 ret = texture2DLod(projectionMap, tc, lod);
 	ret.rgb = srgb_to_linear(ret.rgb);
 	
-	vec2 dist = tc-vec2(0.5);
+	vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
 	
-	float det = max(1.0-lod/(proj_lod*0.5), 0.0);
+	float det = min(lod/(proj_lod*0.5), 1.0);
 	
-	float d = dot(dist,dist);
-		
-	ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
+	float d = min(dist.x, dist.y);
+    
+    d *= min(1, d * (proj_lod - lod));
+	
+	float edge = 0.25*det;
+    
+	ret *= clamp(d/edge, 0.0, 1.0);
 	
 	return ret;
 }
@@ -321,7 +325,7 @@ void main()
 					stc.x > 0.0 &&
 					stc.y > 0.0)
 				{
-					col += color.rgb * texture2DLodDiffuse(projectionMap, stc.xy, (1 - spec.a * spec.a) * (proj_lod * 0.5)).rgb * envIntensity;
+					col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, (1 - spec.a) * (proj_lod * 0.6)).rgb * envIntensity;
 				}
 			}
 		}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
index 38f383f0c42220d66f8bd1caae31e7c50e0e6e8e..f50635a1390bc38e6fa8e968bbc39780aa7d1241 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
@@ -130,15 +130,19 @@ vec4 correctWithGamma(vec4 col)
 vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
 {
 	vec4 ret = texture2DLod(projectionMap, tc, lod);
-	ret = correctWithGamma(ret);
+	ret.rgb = srgb_to_linear(ret.rgb);
 	
-	vec2 dist = tc-vec2(0.5);
+	vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
 	
-	float det = max(1.0-lod/(proj_lod*0.5), 0.0);
+	float det = min(lod/(proj_lod*0.5), 1.0);
 	
-	float d = dot(dist,dist);
-		
-	ret *= min(clamp((0.125-d)/0.125, 0.0, 1.0)+det, 1.0);
+	float d = min(dist.x, dist.y);
+    
+    d *= min(1, d * (proj_lod - lod));
+	
+	float edge = 0.25*det;
+    
+	ret *= clamp(d/edge, 0.0, 1.0);
 	
 	return ret;
 }
@@ -329,7 +333,7 @@ void main()
 					stc.x > 0.0 &&
 					stc.y > 0.0)
 				{
-					col += color.rgb * texture2DLodDiffuse(projectionMap, stc.xy, (1 - spec.a * spec.a) * (proj_lod * 0.5)).rgb * envIntensity;
+					col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, (1 - spec.a) * (proj_lod * 0.6)).rgb * envIntensity;
 				}
 			}
 		}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index 09cb195fa345a3b7eec796f349a7062f2242a643..65bf08ee66ec224dcaf2f9678fd5f4ab1b7487df 100755
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -131,15 +131,19 @@ vec4 correctWithGamma(vec4 col)
 vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
 {
 	vec4 ret = texture2DLod(projectionMap, tc, lod);
-	ret = correctWithGamma(ret);
-
-	vec2 dist = tc-vec2(0.5);
+	ret.rgb = srgb_to_linear(ret.rgb);
 	
-	float det = max(1.0-lod/(proj_lod*0.5), 0.0);
+	vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
 	
-	float d = dot(dist,dist);
-		
-	ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
+	float det = min(lod/(proj_lod*0.5), 1.0);
+	
+	float d = min(dist.x, dist.y);
+    
+    d *= min(1, d * (proj_lod - lod));
+	
+	float edge = 0.25*det;
+    
+	ret *= clamp(d/edge, 0.0, 1.0);
 	
 	return ret;
 }
@@ -344,7 +348,7 @@ void main()
 					stc.x > 0.0 &&
 					stc.y > 0.0)
 				{
-					col += color.rgb * texture2DLodDiffuse(projectionMap, stc.xy, (1 - spec.a * spec.a) * (proj_lod * 0.5)).rgb * shadow * envIntensity;
+					col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, ((1 - spec.a) * 2) * (proj_lod)).rgb * shadow * envIntensity;
 				}
 			}
 		}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index 3d0cbbcc4d2b07528bbde95b26f9509a1529cbb6..30533152751e4b1bed69cd33d9ddc7e579421013 100755
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -131,15 +131,19 @@ vec4 correctWithGamma(vec4 col)
 vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
 {
 	vec4 ret = texture2DLod(projectionMap, tc, lod);
-	ret = correctWithGamma(ret);
+	ret.rgb = srgb_to_linear(ret.rgb);
 	
-	vec2 dist = tc-vec2(0.5);
+	vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
 	
-	float det = max(1.0-lod/(proj_lod*0.5), 0.0);
+	float det = min(lod/(proj_lod*0.5), 1.0);
 	
-	float d = dot(dist,dist);
-		
-	ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
+	float d = min(dist.x, dist.y);
+    
+    d *= min(1, d * (proj_lod - lod));
+	
+	float edge = 0.25*det;
+    
+	ret *= clamp(d/edge, 0.0, 1.0);
 	
 	return ret;
 }
@@ -343,7 +347,7 @@ void main()
 					stc.x > 0.0 &&
 					stc.y > 0.0)
 				{
-					col += color.rgb * texture2DLodDiffuse(projectionMap, stc.xy, (1 - spec.a * spec.a) * (proj_lod * 0.5)).rgb * shadow * envIntensity;
+					col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, (1 - spec.a * spec.a) * (proj_lod)).rgb * shadow * envIntensity;
 				}
 			}
 		}