diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index 57f2489a2d6883c4cbc2f5766a6289342ecffe5f..8f01ad6c1cad3f02a79c14b928327ba62bd43a61 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -537,9 +537,12 @@ inline void ll_remove_outliers(std::vector<VEC_TYPE>& data, F32 k)
 	}
 }
 
-// This converts from a non-linear sRGB floating point value (0..1) to a linear value.
-// Useful for gamma correction and such.  Note: any values passed through this should not be serialized.  You should also ideally cache the output of this.
-inline float sRGBtoLinear(const float val) {
+// Converts given value from a linear RGB floating point value (0..1) to a gamma corrected (sRGB) value.
+// Some shaders require color values in linear space, while others require color values in gamma corrected (sRGB) space.
+// Note: in our code, values labeled as sRGB are ALWAYS gamma corrected linear values, NOT linear values with monitor gamma applied
+// Note: stored color values should always be gamma corrected linear (i.e. the values returned from an on-screen color swatch)
+// Note: DO NOT cache the conversion.  This leads to error prone synchronization and is actually slower in the typical case due to cache misses
+inline float linearTosRGB(const float val) {
     if (val < 0.0031308f) {
         return val * 12.92f;
     }
@@ -548,7 +551,13 @@ inline float sRGBtoLinear(const float val) {
     }
 }
 
-inline float linearTosRGB(const float val) {
+// Converts given value from a gamma corrected (sRGB) floating point value (0..1) to a linear color value.
+// Some shaders require color values in linear space, while others require color values in gamma corrected (sRGB) space.
+// Note: In our code, values labeled as sRGB are gamma corrected linear values, NOT linear values with monitor gamma applied
+// Note: Stored color values should generally be gamma corrected sRGB.  
+//       If you're serializing the return value of this function, you're probably doing it wrong.
+// Note: DO NOT cache the conversion.  This leads to error prone synchronization and is actually slower in the typical case due to cache misses.
+inline float sRGBtoLinear(const float val) {
     if (val < 0.04045f) {
         return val / 12.92f;
     }
diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h
index ac78197510b110dec502c9baae69419c04e2949c..43a632408c7fc05ddec03bf0ad266c800855a7cb 100644
--- a/indra/llmath/v3color.h
+++ b/indra/llmath/v3color.h
@@ -484,4 +484,13 @@ inline const LLColor3 srgbColor3(const LLColor3 &a) {
 	return srgbColor;
 }
 
+inline const LLColor3 linearColor3(const LLColor3 &a) {
+    LLColor3 linearColor;
+    linearColor.mV[0] = sRGBtoLinear(a.mV[0]);
+    linearColor.mV[1] = sRGBtoLinear(a.mV[1]);
+    linearColor.mV[2] = sRGBtoLinear(a.mV[2]);
+
+    return linearColor;
+}
+
 #endif
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index 1b65d4a0035ea61ccb463d68b6b161028ab4f37b..c0e60e88fe6cc598f87a5012a5640c2a46be2362 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -659,6 +659,7 @@ void LLColor4::clamp()
 	}
 }
 
+// Return the given linear space color value in gamma corrected (sRGB) space
 inline const LLColor4 srgbColor4(const LLColor4 &a) {
     LLColor4 srgbColor;
 
@@ -670,5 +671,15 @@ inline const LLColor4 srgbColor4(const LLColor4 &a) {
     return srgbColor;
 }
 
+// Return the given gamma corrected (sRGB) color in linear space
+inline const LLColor4 linearColor4(const LLColor4 &a)
+{
+    LLColor4 linearColor;
+    linearColor.mV[0] = sRGBtoLinear(a.mV[0]);
+    linearColor.mV[1] = sRGBtoLinear(a.mV[1]);
+    linearColor.mV[2] = sRGBtoLinear(a.mV[2]);
+    linearColor.mV[3] = a.mV[3];
+}
+
 #endif
 
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 20b5ad8eff9034a010194140b39944429ba492d2..ed89462e5a5dc25b9b6a91f86120006857484390 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -132,8 +132,7 @@ extern const F32 LIGHT_MAX_CUTOFF;
 class LLLightParams : public LLNetworkData
 {
 protected:
-	LLColor4 mColor; // alpha = intensity
-    LLColor4 mSRGBColor; // Only used in deferred (for now?)
+	LLColor4 mColor; // gamma corrected color (sRGB), alpha = intensity
 	F32 mRadius;
 	F32 mFalloff;
 	F32 mCutoff;
@@ -151,13 +150,20 @@ class LLLightParams : public LLNetworkData
 	bool fromLLSD(LLSD& sd);
 
 
-    void setColor(const LLColor4& color)	{ mColor = color; mColor.clamp(); mSRGBColor = srgbColor4(mColor); }
+    // set the color 
+    //  color - gamma corrected color value (directly taken from an on-screen color swatch)
+    void setColor(const LLColor4& color)	{ mColor = color; mColor.clamp(); }
 	void setRadius(F32 radius)				{ mRadius = llclamp(radius, LIGHT_MIN_RADIUS, LIGHT_MAX_RADIUS); }
 	void setFalloff(F32 falloff)			{ mFalloff = llclamp(falloff, LIGHT_MIN_FALLOFF, LIGHT_MAX_FALLOFF); }
 	void setCutoff(F32 cutoff)				{ mCutoff = llclamp(cutoff, LIGHT_MIN_CUTOFF, LIGHT_MAX_CUTOFF); }
 
+    // same as getSRGBColor
     LLColor4 getColor() const				{ return mColor; }
-    LLColor4 getSRGBColor() const			{ return mSRGBColor; }
+    // get the sRGB (gamma corrected) color of this light
+    LLColor4 getSRGBColor() const			{ return mColor; }
+    // get the linear space color of this light
+    LLColor4 getLinearColor() const { return linearColor4(mColor); }
+
 	F32 getRadius() const					{ return mRadius; }
 	F32 getFalloff() const					{ return mFalloff; }
 	F32 getCutoff() const					{ return mCutoff; }
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 2b609dad0181284d736a6f0bdea705fd883c1c24..9fc7ed023b988fe0c01788710f413dac6946c2e4 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -2335,34 +2335,37 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
 			{
 				
 				U32 unsatisfied_mask = (required_mask & ~data_mask);
-				for (U32 i = 0; i < TYPE_MAX; i++) // <alchemy/>
-				{
-                    U32 unsatisfied_flag = unsatisfied_mask & (1 << i);
-					switch (unsatisfied_flag)
-					{
-						case MAP_VERTEX: LL_INFOS() << "Missing vert pos" << LL_ENDL; break;
-						case MAP_NORMAL: LL_INFOS() << "Missing normals" << LL_ENDL; break;
-						case MAP_TEXCOORD0: LL_INFOS() << "Missing TC 0" << LL_ENDL; break;
-						case MAP_TEXCOORD1: LL_INFOS() << "Missing TC 1" << LL_ENDL; break;
-						case MAP_TEXCOORD2: LL_INFOS() << "Missing TC 2" << LL_ENDL; break;
-						case MAP_TEXCOORD3: LL_INFOS() << "Missing TC 3" << LL_ENDL; break;
-						case MAP_COLOR: LL_INFOS() << "Missing vert color" << LL_ENDL; break;
-						case MAP_EMISSIVE: LL_INFOS() << "Missing emissive" << LL_ENDL; break;
-						case MAP_TANGENT: LL_INFOS() << "Missing tangent" << LL_ENDL; break;
-						case MAP_WEIGHT: LL_INFOS() << "Missing weight" << LL_ENDL; break;
-						case MAP_WEIGHT4: LL_INFOS() << "Missing weightx4" << LL_ENDL; break;
-						case MAP_CLOTHWEIGHT: LL_INFOS() << "Missing clothweight" << LL_ENDL; break;
-						case MAP_TEXTURE_INDEX: LL_INFOS() << "Missing tex index" << LL_ENDL; break;
-						default: LL_INFOS() << "Missing who effin knows: " << unsatisfied_flag << LL_ENDL;
-					}					
-				}
-
-            if (unsatisfied_mask & (1 << TYPE_INDEX))
-            {
-               LL_INFOS() << "Missing indices" << LL_ENDL;
-            }
 
-				LL_WARNS() << "Shader consumption mismatches data provision." << LL_ENDL;
+                for (U32 i = 0; i < TYPE_MAX; i++)
+                {
+                    U32 unsatisfied_flag = unsatisfied_mask & (1 << i);
+                    switch (unsatisfied_flag)
+                    {
+                        case 0: break;
+                        case MAP_VERTEX: LL_INFOS() << "Missing vert pos" << LL_ENDL; break;
+                        case MAP_NORMAL: LL_INFOS() << "Missing normals" << LL_ENDL; break;
+                        case MAP_TEXCOORD0: LL_INFOS() << "Missing TC 0" << LL_ENDL; break;
+                        case MAP_TEXCOORD1: LL_INFOS() << "Missing TC 1" << LL_ENDL; break;
+                        case MAP_TEXCOORD2: LL_INFOS() << "Missing TC 2" << LL_ENDL; break;
+                        case MAP_TEXCOORD3: LL_INFOS() << "Missing TC 3" << LL_ENDL; break;
+                        case MAP_COLOR: LL_INFOS() << "Missing vert color" << LL_ENDL; break;
+                        case MAP_EMISSIVE: LL_INFOS() << "Missing emissive" << LL_ENDL; break;
+                        case MAP_TANGENT: LL_INFOS() << "Missing tangent" << LL_ENDL; break;
+                        case MAP_WEIGHT: LL_INFOS() << "Missing weight" << LL_ENDL; break;
+                        case MAP_WEIGHT4: LL_INFOS() << "Missing weightx4" << LL_ENDL; break;
+                        case MAP_CLOTHWEIGHT: LL_INFOS() << "Missing clothweight" << LL_ENDL; break;
+                        case MAP_TEXTURE_INDEX: LL_INFOS() << "Missing tex index" << LL_ENDL; break;
+                        default: LL_INFOS() << "Missing who effin knows: " << unsatisfied_flag << LL_ENDL;
+                    }
+                }
+
+                // TYPE_INDEX is beyond TYPE_MAX, so check for it individually
+                if (unsatisfied_mask & (1 << TYPE_INDEX))
+                {
+                   LL_INFOS() << "Missing indices" << LL_ENDL;
+                }
+
+				LL_ERRS() << "Shader consumption mismatches data provision." << LL_ENDL;
 			}
 		}
 	}
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index c89d7e39580712809e80f5e56e57c4594277af8a..9867bd16d6394d6982271afdefc2527108cfa83d 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -179,8 +179,8 @@ class LLVertexBuffer : public LLRefCount, public LLTrace::MemTrackable<LLVertexB
 		TYPE_WEIGHT4,
 		TYPE_CLOTHWEIGHT,
 		TYPE_TEXTURE_INDEX,
-		TYPE_MAX,
-		TYPE_INDEX,		
+		TYPE_MAX,   // TYPE_MAX is the size/boundary marker for attributes that go in the vertex buffer
+		TYPE_INDEX,	// TYPE_INDEX is beyond _MAX because it lives in a separate (index) buffer	
 	};
 	enum {
 		MAP_VERTEX = (1<<TYPE_VERTEX),
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 5b94baf7e600de2feb65cb62f25fc1d3074facd3..a5804220bc069a0ac8dca479953699e454e1ad16 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -84,7 +84,8 @@ void main()
     
     vec3 light_dir = (sun_up_factor == 1) ? sun_dir : moon_dir;
     float da = clamp(dot(norm.xyz, light_dir.xyz), 0.0, 1.0);
-    //da = pow(da, 1.0/1.3);
+    float light_gamma = 1.0/1.3;
+    da = pow(da, light_gamma);
     
     vec4 diffuse = texture2DRect(diffuseRect, tc);
 
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 0658b3ede53629764693b44cba0162d89aee1b5e..b0dff0c62839c89935e2079b6f2118172eb083d2 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -22,7 +22,7 @@
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
- 
+
 #extension GL_ARB_texture_rectangle : enable
 #extension GL_ARB_shader_texture_lod : enable
 
@@ -80,63 +80,55 @@ void main()
     vec4 pos = getPositionWithDepth(tc, depth);
     vec4 norm = texture2DRect(normalMap, tc);
     float envIntensity = norm.z;
-    norm.xyz = getNorm(tc); // unpack norm
-
-    vec3 light_dir = (sun_up_factor == 1) ? sun_dir : moon_dir;        
+    norm.xyz = getNorm(tc);
+    
+    vec3 light_dir = (sun_up_factor == 1) ? sun_dir : moon_dir;
+    float da = clamp(dot(norm.xyz, light_dir.xyz), 0.0, 1.0);
+    float light_gamma = 1.0/1.3;
+    da = pow(da, light_gamma);
+    
+    vec4 diffuse = texture2DRect(diffuseRect, tc);
+    
+    vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
 
-    float scol = 1.0;
     vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
+    scol_ambocc = pow(scol_ambocc, vec2(light_gamma));
 
-    float da = clamp(dot(normalize(norm.xyz), light_dir.xyz), 0.0, 1.0);
-    da = pow(da, 1.0/1.3);
-    vec4 diffuse_srgb   = texture2DRect(diffuseRect, tc);
-    vec4 diffuse_linear = vec4(srgb_to_linear(diffuse_srgb.rgb), diffuse_srgb.a);
+    float scol = max(scol_ambocc.r, diffuse.a); 
 
-    // clamping to alpha value kills underwater shadows...
-    //scol = max(scol_ambocc.r, diffuse_linear.a);
-    scol = scol_ambocc.r;
+    float ambocc = scol_ambocc.g;
 
-    vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
     vec3 color = vec3(0);
     float bloom = 0.0;
     {
-        float ambocc = scol_ambocc.g;
-
         vec3 sunlit;
         vec3 amblit;
         vec3 additive;
         vec3 atten;
     
         calcAtmosphericVars(pos.xyz, light_dir, ambocc, sunlit, amblit, additive, atten, true);
-        
+
+        color.rgb = amblit;
+
         float ambient = min(abs(dot(norm.xyz, sun_dir.xyz)), 1.0);
         ambient *= 0.5;
         ambient *= ambient;
         ambient = (1.0 - ambient);
 
-        vec3 sun_contrib = min(scol, da) * sunlit;
-
-#if !defined(AMBIENT_KILL)
-        color.rgb = amblit;
         color.rgb *= ambient;
-#endif
 
-vec3 post_ambient = color.rgb;
+        vec3 sun_contrib = min(da, scol) * sunlit;
 
-#if !defined(SUNLIGHT_KILL)
         color.rgb += sun_contrib;
-#endif
-
-vec3 post_sunlight = color.rgb;
-
-        color.rgb *= diffuse_srgb.rgb;
 
-vec3 post_diffuse = color.rgb;
+        color.rgb *= diffuse.rgb;
 
         vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
 
         if (spec.a > 0.0) // specular reflection
         {
+
+#if 1 //EEP
             vec3 npos = -normalize(pos.xyz);
 
             //vec3 ref = dot(pos+lv, norm);
@@ -149,73 +141,60 @@ vec3 post_diffuse = color.rgb;
 
             float gtdenom = 2 * nh;
             float gt = max(0, min(gtdenom * nv / vh, gtdenom * da / vh));
-                                    
+            
             if (nh > 0.0)
             {
                 float scontrib = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
                 vec3 sp = sun_contrib*scontrib / 6.0;
                 sp = clamp(sp, vec3(0), vec3(1));
                 bloom += dot(sp, sp) / 4.0;
-#if !defined(SUNLIGHT_KILL)
                 color += sp * spec.rgb;
-#endif
             }
+#else //PRODUCTION
+            float sa = dot(refnormpersp, light_dir.xyz);
+            vec3 dumbshiny = sunlit*(texture2D(lightFunc, vec2(sa, spec.a)).r);
+            
+            // add the two types of shiny together
+            vec3 spec_contrib = dumbshiny * spec.rgb;
+            bloom = dot(spec_contrib, spec_contrib) / 6;
+            color.rgb += spec_contrib;
+#endif
+
         }
        
- vec3 post_spec = color.rgb;
-
-        color.rgb = mix(color.rgb, diffuse_srgb.rgb, diffuse_srgb.a);
+       color.rgb = mix(color.rgb, diffuse.rgb, diffuse.a);
 
         if (envIntensity > 0.0)
         { //add environmentmap
             vec3 env_vec = env_mat * refnormpersp;
             vec3 reflected_color = textureCube(environmentMap, env_vec).rgb;
-#if !defined(SUNLIGHT_KILL)
-            color = mix(color.rgb, reflected_color, envIntensity*0.75); // MAGIC NUMBER SL-12574; ALM: On, Quality >= High
-#endif
+            color = mix(color.rgb, reflected_color, envIntensity);
         }
-
-vec3 post_env = color.rgb;
-
+       
         if (norm.w < 0.5)
         {
-#if !defined(SUNLIGHT_KILL)
-            vec3 p = normalize(pos.xyz);
-            color = mix(atmosFragLighting(color, additive, atten), fullbrightAtmosTransportFrag(color, additive, atten), diffuse_srgb.a);
-            color = mix(scaleSoftClipFrag(color), fullbrightScaleSoftClip(color), diffuse_srgb.a);
-#endif
+            color = mix(atmosFragLighting(color, additive, atten), fullbrightAtmosTransportFrag(color, additive, atten), diffuse.a);
+            color = mix(scaleSoftClipFrag(color), fullbrightScaleSoftClip(color), diffuse.a);
         }
 
-vec3 post_atmo = color.rgb;
-
         #ifdef WATER_FOG
             vec4 fogged = applyWaterFogView(pos.xyz,vec4(color, bloom));
             color = fogged.rgb;
             bloom = fogged.a;
         #endif
 
-// srgb colorspace debuggables
-//color.rgb = amblit;
-//color.rgb = sunlit;
-//color.rgb = post_ambient;
-//color.rgb = sun_contrib;
-//color.rgb = post_sunlight;
-//color.rgb = diffuse_srgb.rgb;
-//color.rgb = post_diffuse;
-//color.rgb = post_spec;
-//color.rgb = post_env;
-//color.rgb = post_atmo;
-
     }
 
 // linear debuggables
 //color.rgb = vec3(final_da);
 //color.rgb = vec3(ambient);
 //color.rgb = vec3(scol);
-//color.rgb = diffuse_linear.rgb;
+//color.rgb = diffuse_srgb.rgb;
 
-        //output linear RGB as lights are summed up in linear space and then gamma corrected prior to the 
-        //post deferred passes
+    // convert to linear as fullscreen lights need to sum in linear colorspace
+    // and will be gamma (re)corrected downstream...
+    
     frag_color.rgb = srgb_to_linear(color.rgb);
     frag_color.a = bloom;
 }
+
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
index b0cf9b00029726f007a1244fbe9d8cb74709fbd6..b53a2e237f332bfb2e39157cf9c5b74b47399e32 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
@@ -46,8 +46,8 @@ vec3 atmosTransport(vec3 light)
 
 vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
 {
-    float brightness = dot(light.rgb * 0.5, vec3(0.3333)) + 0.1;
-    return mix(atmosTransport(light.rgb), light.rgb + additive, brightness * brightness);
+    float brightness = dot(light.rgb * 0.5, vec3(0.3333)) + 0.1;    
+    return mix(atmosTransportFrag(light.rgb, additive, atten), light.rgb + additive, brightness * brightness);
 }
 
 vec3 fullbrightAtmosTransport(vec3 light)
diff --git a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
index aa7dbc39ce23a717015bd1821c8dc3a41bdd466e..545a32a227453028da553139c9d1f17a348a997b 100644
--- a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
@@ -52,7 +52,8 @@ vec3 atmosTransport(vec3 light)
 vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
 {
     float brightness = dot(light.rgb, vec3(0.33333));
-    return atmosTransportFrag(light * 0.5, additive * (brightness * 0.5 + 0.5), atten);
+    return vec3(1,0,1);
+    //return atmosTransportFrag(light * 0.5, additive * (brightness * 0.5 + 0.5), atten);
 }
 
 vec3 fullbrightAtmosTransport(vec3 light)
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 0acb623d2a2960109cfce3f0d3d79d359c8bf05b..aa42ca6a29eb089eda5daf69e79b9b48e84d81eb 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3279,17 +3279,11 @@ LLColor3 LLVOVolume::getLightBaseColor() const
 	}
 }
 
-LLColor3 LLVOVolume::getLightColor() const
+LLColor3 LLVOVolume::getLightLinearColor() const
 {
-	const LLLightParams *param_block = (const LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT);
-	if (param_block)
-	{
-		return LLColor3(param_block->getColor()) * param_block->getColor().mV[3];
-	}
-	else
-	{
-		return LLColor3(1,1,1);
-	}
+    LLColor3 ret = getLightSRGBColor();
+    ret = linearColor3(ret);
+    return ret;
 }
 
 LLColor3 LLVOVolume::getLightSRGBColor() const
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index f0458cf41b101e75971493c39f6d89bdb7e8b80d..decc195208154179821fb54941fd2e8540829f74 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -255,9 +255,20 @@ class LLVOVolume : public LLViewerObject
 	void setSpotLightParams(LLVector3 params);
 
 	BOOL getIsLight() const;
-	LLColor3 getLightBaseColor() const; // not scaled by intensity
-	LLColor3 getLightColor() const; // scaled by intensity
-    LLColor3 getLightSRGBColor() const; // Used to get the (cached) light color in sRGB color space.  Also scaled by intensity.
+
+
+    // Get the light color in sRGB color space NOT scaled by intensity.
+	LLColor3 getLightBaseColor() const; 
+    
+    //same as getLightSRGBColor()
+    LLColor3 getLightColor() const { return getLightSRGBColor(); }
+
+    // Same as linearColor3(getLightSRGBColor)
+    LLColor3 getLightLinearColor() const;
+
+    // Get the light color in sRGB color space scaled by intensity.
+    LLColor3 getLightSRGBColor() const; 
+
 	LLUUID	getLightTextureID() const;
 	bool isLightSpotlight() const;
 	LLVector3 getSpotLightParams() const;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 702dadfb9ddfdc4d3077a46444f36428bdf53fbb..b3ed7e95b21f881888211b2ecc07a51b420ba575 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6369,7 +6369,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
 				mLightMovingMask |= (1<<cur_light);
 			}
 			
-			LLColor4  light_color = sRenderDeferred ? light->getLightSRGBColor() : light->getLightColor();
+            //NOTE: for legacy reasons, send sRGB color to light shader for both deferred and non-deferred path
+			LLColor4  light_color = light->getLightColor();
 			light_color.mV[3] = 0.0f;
 
 			F32 fade = iter->fade;
@@ -8813,7 +8814,8 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
 					const F32* c = center.getF32ptr();
 					F32 s = volume->getLightRadius()*1.5f;
 
-                    LLColor3 col = volume->getLightSRGBColor();
+                    //NOTE: for legacy reasons, send sRGB color to light shader
+                    LLColor3 col = volume->getLightColor();
 					
 					if (col.magVecSquared() < 0.001f)
 					{
@@ -8905,7 +8907,8 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
 
 					setupSpotLight(gDeferredSpotLightProgram, drawablep);
 					
-                    LLColor3 col = volume->getLightSRGBColor();
+                    //NOTE: for legacy reasons, send sRGB color to light shader
+                    LLColor3 col = volume->getLightColor();
 					
 					gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c);
 					gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s);
@@ -8994,8 +8997,8 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
 					
 					setupSpotLight(gDeferredMultiSpotLightProgram, drawablep);
 
-                    LLColor3 col = volume->getLightSRGBColor();
-					
+                    //NOTE: for legacy reasons, send sRGB color to light shader
+                    LLColor3 col = volume->getLightColor();
 					
 					gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
                     gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, light_size_final);