diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 326c938e8e2d6dad2579e11888e5208a271ad9e5..810afe210d977d9869454cf071f764780fc92e4d 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -974,7 +974,7 @@ void LLShaderMgr::initAttribsAndUniforms()
 	mReservedUniforms.push_back("cloude_noise_texture");
 	mReservedUniforms.push_back("fullbright");
 	mReservedUniforms.push_back("lightnorm");
-	mReservedUniforms.push_back("sunlight_color");
+	mReservedUniforms.push_back("sunlight_color_copy");
 	mReservedUniforms.push_back("ambient");
 	mReservedUniforms.push_back("blue_horizon");
 	mReservedUniforms.push_back("blue_density");
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
index 89b6a52909a30821f2350156f702feceed2b5e51..4fe0ef9caf8e52964aab5216e04e392ae1249298 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
@@ -23,7 +23,7 @@
  * $/LicenseInfo$
  */
  
-uniform vec4 sunlight_color;
+uniform vec4 sunlight_color_copy;
 uniform vec4 light_ambient;
 
 vec3 atmosAmbient(vec3 light)
@@ -33,7 +33,7 @@ vec3 atmosAmbient(vec3 light)
 
 vec3 atmosAffectDirectionalLight(float lightIntensity)
 {
-	return sunlight_color.rgb * lightIntensity;
+	return sunlight_color_copy.rgb * lightIntensity;
 }
 
 vec3 atmosGetDiffuseSunlightColor()