diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 5d936233fe91fbff5b16bfeaff3cb4f96095af48..a1dff9188f9c9e86518046c77439848ac2fcbcd0 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -321,8 +321,6 @@ void main()
 			col += spec_contrib;
 		}
 	
-		col = mix(col.rgb, diffuse.rgb, diffuse.a);
-
 		if (envIntensity > 0.0)
 		{ //add environmentmap
 			vec3 env_vec = env_mat * refnormpersp;
@@ -332,6 +330,8 @@ void main()
 
 		col = atmosLighting(col);
 		col = scaleSoftClip(col);
+
+		col = mix(col.rgb, diffuse.rgb, diffuse.a);
 	}
 	
 	frag_color.rgb = col;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 15584548cc7e56f7b71afdfda11c123c016fd0c0..10a598a85c69cfa16dd20c526476a44c0dbffaee 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -330,8 +330,6 @@ void main()
 			col += spec_contrib;
 		}
 
-		col = mix(col, diffuse.rgb, diffuse.a);
-
 		if (envIntensity > 0.0)
 		{ //add environmentmap
 			vec3 env_vec = env_mat * refnormpersp;
@@ -341,6 +339,8 @@ void main()
 			
 		col = atmosLighting(col);
 		col = scaleSoftClip(col);
+
+		col = mix(col.rgb, diffuse.rgb, diffuse.a);
 	}