diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
index ad50690c02609dc8a8e37e2309689741e4e7eac8..c11298aadd7a1db390a6d9c7c3e03c50ab9ddf1f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
@@ -110,14 +110,18 @@ void main()
 		{
 			lv = normalize(lv);
 			da = dot(norm, lv);
-					
+			
 			float fa = light_col[i].a+1.0;
 			float dist_atten = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
+			
 			dist_atten *= noise;
 
 			float lit = da * dist_atten;
-			
+
+			lit = pow(lit,0.7);
+						
 			vec3 col = light_col[i].rgb*lit*diff;
+			
 			//vec3 col = vec3(dist2, light_col[i].a, lit);
 			
 			if (spec.a > 0.0)
@@ -128,15 +132,16 @@ void main()
 				float nv = dot(norm, npos);
 				float vh = dot(npos, h);
 				float sa = nh;
-				vec3 fres = spec.rgb + pow(1 - dot(h, npos), 5) * (1 - spec.rgb);
+				float fres = pow(1 - dot(h, npos), 5)*0.4+0.5;
+
 				float gtdenom = 2 * nh;
 				float gt = max(0, min(gtdenom * nv / vh, gtdenom * da / vh));
-				
-				
-				if (sa > 0.0)
+								
+				if (nh > 0.0)
 				{
-					vec3 scol = (fres * texture2D(lightFunc, vec2(nh, spec.a)).r * gt) / (nh * da);
-					col += lit*scol*light_col[i].rgb;
+					float scol = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
+					col += lit*scol*light_col[i].rgb*spec.rgb;
+					//col += spec.rgb;
 				}
 			}
 			
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index bff87cb6aac7499a1ae030a8b6fac365c9ee19e2..09d23db0967d145f52772efe235af55bf12b8cf4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -40,6 +40,7 @@ uniform sampler2DRect normalMap;
 uniform samplerCube environmentMap;
 uniform sampler2D noiseMap;
 uniform sampler2D projectionMap;
+uniform sampler2D lightFunc;
 
 uniform mat4 proj_mat; //screen space to light space
 uniform float proj_near; //near clip for projection
@@ -142,7 +143,7 @@ void main()
 	}
 		
 	vec3 norm = texture2DRect(normalMap, frag.xy).xyz;
-	norm = vec3((norm.xy-0.5)*2.0, norm.z);
+	norm = norm = (norm.xyz-0.5)*2.0;
 	
 	norm = normalize(norm);
 	float l_dist = -dot(lv, proj_n);
@@ -190,6 +191,8 @@ void main()
 			vec3 lcol = color.rgb * plcol.rgb * plcol.a;
 			
 			lit = da * dist_atten * noise;
+
+			lit = pow(lit, 0.7);
 			
 			col = lcol*lit*diff_tex;
 			amb_da += (da*0.5)*proj_ambiance;
@@ -236,8 +239,28 @@ void main()
 					stc.x > 0.0 &&
 					stc.y > 0.0)
 				{
-					vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
-					col += dist_atten*scol.rgb*color.rgb*scol.a*spec.rgb;
+
+					vec3 npos = -normalize(pos);
+					lv = pfinal-pos.xyz;
+					lv = normalize(lv);
+
+					vec3 h = normalize(lv+npos);
+					float nh = dot(norm, h);
+					float nv = dot(norm, npos);
+					float vh = dot(npos, h);
+					float sa = nh;
+					float fres = pow(1 - dot(h, npos), 5)*0.4+0.5;
+					float gtdenom = 2 * nh;
+					float gt = max(0,(min(gtdenom * nv / vh, gtdenom * da / vh)));
+
+					if (sa > 0.0)
+					{
+						float scol = fres * texture2D(lightFunc, vec2(nh, spec.a)).r * gt / (nh * da);
+						col += scol*color.rgb*texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod).rgb*spec.rgb;
+					}
+					
+					//vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
+					//col += dist_atten*scol.rgb*color.rgb*scol.a*spec.rgb;
 				}
 			}
 		}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
index 03b036375b510c9de5b6494ef095e34c0d3b0782..e99329bbf27db0d953f3b286370e053c4d2bd8ca 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
@@ -102,6 +102,8 @@ void main()
 	float dist_atten = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
 	float lit = da * dist_atten * noise;
 	
+	lit = pow(lit, 0.7);
+
 	col = color.rgb*lit*col;
 
 	vec4 spec = texture2DRect(specularRect, frag.xy);
@@ -113,14 +115,14 @@ void main()
 		float nv = dot(norm, npos);
 		float vh = dot(npos, h);
 		float sa = nh;
-		vec3 fres = spec.rgb + pow(1 - dot(h, npos), 5) * (1 - spec.rgb);
+		float fres = pow(1 - dot(h, npos), 5) * 0.4+0.5;
 		float gtdenom = 2 * nh;
 		float gt = max(0,(min(gtdenom * nv / vh, gtdenom * da / vh)));
 
-		if (sa > 0.0)
+		if (nh > 0.0)
 		{
-			vec3 scol = (fres * texture2D(lightFunc, vec2(nh, spec.a)).r * gt) / (nh * da);
-			col += lit*scol*color.rgb;
+			float scol = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
+			col += lit*scol*color.rgb*spec.rgb;
 		}
 	}
 	
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index f50935c1a84195c0f46cc802fdad2d716104409c..437a06320e8a677a8ff3a890d277df61430fc42c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -280,6 +280,8 @@ void main()
 		
 	float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);
 	
+	da = pow(da, 0.7);
+
 	vec4 diffuse = texture2DRect(diffuseRect, tc);
 	vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
 	
@@ -300,7 +302,7 @@ void main()
 			//
 			vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
 			float sa = dot(refnormpersp, sun_dir.xyz);
-			vec3 dumbshiny = vary_SunlitColor*(6 * texture2D(lightFunc, vec2(sa, spec.a)).r);
+			vec3 dumbshiny = vary_SunlitColor*(texture2D(lightFunc, vec2(sa, spec.a)).r);
 			
 			// add the two types of shiny together
 			vec3 spec_contrib = dumbshiny * spec.rgb;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
index cca63872de2142faa13bce99ad2b4e703e1a73bc..2f18e1a13d4a9af13d62e009698715e99d9bdb33 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
@@ -41,6 +41,8 @@ uniform sampler2DRect normalMap;
 uniform samplerCube environmentMap;
 uniform sampler2D noiseMap;
 uniform sampler2D projectionMap;
+uniform sampler2D lightFunc;
+
 
 uniform mat4 proj_mat; //screen space to light space
 uniform float proj_near; //near clip for projection
@@ -193,6 +195,8 @@ void main()
 			
 			lit = da * dist_atten * noise;
 			
+			lit = pow(lit, 0.7);
+
 			col = lcol*lit*diff_tex;
 			amb_da += (da*0.5)*proj_ambiance;
 		}
@@ -238,8 +242,25 @@ void main()
 					stc.x > 0.0 &&
 					stc.y > 0.0)
 				{
-					vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
-					col += dist_atten*scol.rgb*color.rgb*scol.a*spec.rgb;
+					vec3 npos = -normalize(pos);
+					lv = pfinal-pos.xyz;
+					lv = normalize(lv);
+
+					vec3 h = normalize(lv+npos);
+					float nh = dot(norm, h);
+					float nv = dot(norm, npos);
+					float vh = dot(npos, h);
+					float sa = nh;
+					float fres = pow(1 - dot(h, npos), 5)*0.4+0.5;
+
+					float gtdenom = 2 * nh;
+					float gt = max(0,(min(gtdenom * nv / vh, gtdenom * da / vh)));
+
+					if (nh > 0.0)
+					{
+						float scol = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
+						col += scol*color.rgb*texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod).rgb*spec.rgb;
+					}
 				}
 			}
 		}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index 5621e47ab70989761a7d7249fb43edb503c7b8a6..d237ec623675465b25f0bfece1a39022a23b5aa9 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -39,6 +39,7 @@ uniform samplerCube environmentMap;
 uniform sampler2DRect lightMap;
 uniform sampler2D noiseMap;
 uniform sampler2D projectionMap;
+uniform sampler2D lightFunc;
 
 uniform mat4 proj_mat; //screen space to light space
 uniform float proj_near; //near clip for projection
@@ -177,7 +178,7 @@ void main()
 	lv = proj_origin-pos.xyz;
 	lv = normalize(lv);
 	float da = dot(norm, lv);
-		
+
 	vec3 col = vec3(0,0,0);
 		
 	vec3 diff_tex = texture2DRect(diffuseRect, frag.xy).rgb;
@@ -203,6 +204,8 @@ void main()
 			
 			lit = da * dist_atten * noise;
 			
+			lit = pow(lit, 0.7);
+
 			col = lcol*lit*diff_tex*shadow;
 			amb_da += (da*0.5)*(1.0-shadow)*proj_ambiance;
 		}
@@ -241,6 +244,7 @@ void main()
 
 				float fatten = clamp(spec.a*spec.a+spec.a*0.5, 0.25, 1.0);
 				
+				//stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
 				stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
 								
 				if (stc.x < 1.0 &&
@@ -248,8 +252,29 @@ void main()
 					stc.x > 0.0 &&
 					stc.y > 0.0)
 				{
-					vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
-					col += dist_atten*scol.rgb*color.rgb*scol.a*spec.rgb*shadow;
+					
+					vec3 npos = -normalize(pos);
+					lv = pfinal-pos.xyz;
+					lv = normalize(lv);
+
+					vec3 h = normalize(lv+npos);
+					float nh = dot(norm, h);
+					float nv = dot(norm, npos);
+					float vh = dot(npos, h);
+					float sa = nh;
+					float fres = pow(1 - dot(h, npos), 5)*0.4+0.5;
+
+					float gtdenom = 2 * nh;
+					float gt = max(0,(min(gtdenom * nv / vh, gtdenom * da / vh)));
+
+					if (nh > 0.0)
+					{
+						float scol = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
+						col += scol*color.rgb*texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod).rgb*shadow*spec.rgb;
+					}
+					
+					//vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
+					//col += dist_atten*scol.rgb*color.rgb*scol.a*spec.rgb*shadow;
 				}
 			}
 		}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index ff20b639722216e1dd912d65127a234d3704a618..eafb7d9c758f1de55ee1528d9c32ddfe08ea408b 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -282,7 +282,8 @@ void main()
 	norm.xyz = (norm.xyz-0.5)*2.0; // unpack norm
 		
 	float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);
-	
+	da = pow(da, 0.7);
+
 	vec4 diffuse = texture2DRect(diffuseRect, tc);
 
 	vec3 col;
@@ -309,7 +310,7 @@ void main()
 			//
 			vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
 			float sa = dot(refnormpersp, sun_dir.xyz);
-			vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*(6 * texture2D(lightFunc, vec2(sa, spec.a)).r);
+			vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*(texture2D(lightFunc, vec2(sa, spec.a)).r);
 
 			// add the two types of shiny together
 			vec3 spec_contrib = dumbshiny * spec.rgb;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index 6d6ad6d5655560e5e07ce8008edf82c6500adb8d..af8089ce67faaea86f8db5e52764c2f9507c1ec8 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -39,6 +39,8 @@ uniform samplerCube environmentMap;
 uniform sampler2DRect lightMap;
 uniform sampler2D noiseMap;
 uniform sampler2D projectionMap;
+uniform sampler2D lightFunc;
+
 
 uniform mat4 proj_mat; //screen space to light space
 uniform float proj_near; //near clip for projection
@@ -203,6 +205,8 @@ void main()
 			
 			lit = da * dist_atten * noise;
 			
+			lit = pow(lit, 0.7);
+
 			col = lcol*lit*diff_tex*shadow;
 			amb_da += (da*0.5)*(1.0-shadow)*proj_ambiance;
 		}
@@ -248,8 +252,25 @@ void main()
 					stc.x > 0.0 &&
 					stc.y > 0.0)
 				{
-					vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
-					col += dist_atten*scol.rgb*color.rgb*scol.a*spec.rgb*shadow;
+					vec3 npos = -normalize(pos);
+					lv = pfinal-pos.xyz;
+					lv = normalize(lv);
+
+					vec3 h = normalize(lv+npos);
+					float nh = dot(norm, h);
+					float nv = dot(norm, npos);
+					float vh = dot(npos, h);
+					float sa = nh;
+					float fres = pow(1 - dot(h, npos), 5)*0.4+0.5;
+
+					float gtdenom = 2 * nh;
+					float gt = max(0,(min(gtdenom * nv / vh, gtdenom * da / vh)));
+
+					if (nh > 0.0)
+					{
+						float scol = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
+						col += scol*color.rgb*texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod).rgb*shadow*spec.rgb;
+					}
 				}
 			}
 		}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index 890486c4b1dcab790fd6c9e33eb82255dcefab0b..147fb4562e70b9cc97906a382f2d07b9a4179fd9 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -138,6 +138,7 @@ void main()
 	
 	float shadow = 0.0;
 	float dp_directional_light = max(0.0, dot(norm, sun_dir.xyz));
+	dp_directional_light = pow(dp_directional_light, 0.7);
 
 	vec3 shadow_pos = pos.xyz + displace*norm;
 	vec3 offset = sun_dir.xyz * (1.0-dp_directional_light);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index 2dcd3d656fd8ca480d3f50c8e841f8f4e3ef9d0b..907b96ffe4749b5801e119f954ac30228a554188 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -199,6 +199,7 @@ void main()
 	
 	float shadow = 0.0;
 	float dp_directional_light = max(0.0, dot(norm, sun_dir.xyz));
+	dp_directional_light = pow(dp_directional_light, 0.7);
 
 	vec3 shadow_pos = pos.xyz + displace*norm;
 	vec3 offset = sun_dir.xyz * (1.0-dp_directional_light);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 84fc6a12ec0e2fa77e37c6b6f6f4d07c6ecc54a8..090d3f895056b0aff1d039f8b22208151cebe708 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1266,7 +1266,7 @@ void LLPipeline::createLUTBuffers()
 	{
 		if (!mLightFunc)
 		{
-			U32 lightResX = gSavedSettings.getU32("RenderSpecularResX");
+			/*U32 lightResX = gSavedSettings.getU32("RenderSpecularResX");
 			U32 lightResY = gSavedSettings.getU32("RenderSpecularResY");
 			U8* ls = new U8[lightResX*lightResY];
 			F32 specExp = gSavedSettings.getF32("RenderSpecularExponent");
@@ -1302,10 +1302,10 @@ void LLPipeline::createLUTBuffers()
 					// Combined with a bit of noise and trilinear filtering, the banding is hardly noticable.
 					ls[y*lightResX+x] = (U8)(llclamp(spec * (1.f / 6), 0.f, 1.f) * 255);
 				}
-			}
+			}*/
 		
 
-			/*U32 lightResX = gSavedSettings.getU32("RenderSpecularResX");
+			U32 lightResX = gSavedSettings.getU32("RenderSpecularResX");
 			U32 lightResY = gSavedSettings.getU32("RenderSpecularResY");
 			F32* ls = new F32[lightResX*lightResY];
 			//F32 specExp = gSavedSettings.getF32("RenderSpecularExponent"); // Note: only use this when creating new specular lighting functions.
@@ -1327,15 +1327,36 @@ void LLPipeline::createLUTBuffers()
 					// This is fine, given we only need to create our LUT once per buffer initialization.
 					spec *= (((n + 2) * (n + 4)) / (8 * F_PI * (powf(2, -n/2) + n)));
 					
+					spec = llclamp(spec, 0.f, 1.f);
+					spec = powf(spec, 0.6f);
+
 					// Since we use R16F, we no longer have a dynamic range issue we need to work around here.
 					// Though some older drivers may not like this, newer drivers shouldn't have this problem.
 					ls[y*lightResX+x] = spec;
+
+					
+					//beckmann distribution
+					/*F32 alpha = acosf((F32) x/(lightResX-1));
+					F32 m = 1.f - (F32) y/(lightResY-1);
+
+					F32 cos4_alpha = cosf(alpha);
+					cos4_alpha *= cos4_alpha;
+					cos4_alpha *= cos4_alpha;
+
+					F32 tan_alpha = tanf(alpha);
+					F32 tan2_alpha = tan_alpha*tan_alpha;
+
+					F32 k = expf(-(tan2_alpha)/(m*m)) /
+						(3.14159f*m*m*cos4_alpha);
+
+					ls[y*lightResX+x] = k;*/
 				}
-			}*/
+			}
 			
 			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, GL_R8, 1, &mLightFunc);
 			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);
-			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_R16F, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false);
+			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_R16F, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false);
+			//LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_UNSIGNED_BYTE, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false);
 			gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
 			gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR);
 			
@@ -8255,7 +8276,7 @@ void LLPipeline::renderDeferredLighting()
 							LLFastTimer ftm(FTM_LOCAL_LIGHTS);
 							gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c);
 							gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
-							gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, pow3f(col, 2.2f).mV);
+							gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
 							gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
 							gGL.syncMatrices();
 							
@@ -8311,7 +8332,7 @@ void LLPipeline::renderDeferredLighting()
 					
 					gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c);
 					gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
-					gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, pow3f(col, 2.2f).mV);
+					gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
 					gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
 					gGL.syncMatrices();
 										
@@ -8402,7 +8423,7 @@ void LLPipeline::renderDeferredLighting()
 					
 					gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
 					gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
-					gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, pow3f(col, 2.2f).mV);
+					gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
 					gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
 					mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
 				}