summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-07-24 04:03:27 -0700
committerGraham Linden <graham@lindenlab.com>2013-07-24 04:03:27 -0700
commite290dd3fa175c2a891cc4f4e0c401edb10cedfb4 (patch)
tree2a542af707196211e78051cbb8a75a1a1583538d /indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
parent72a0ae58e909b017c07e543bc99adc1db5e89180 (diff)
NORSPEC-311 make post deferred (alpha objects) respect same gamma ramp as deferred (opaque objects)
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 6f11e8427c..045b449bbf 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -101,6 +101,11 @@ vec3 linear_to_srgb(vec3 cl)
cs = { 1.055 * cl^0.41666 - 0.055, 0.0031308 <= cl < 1
{ 1.0, cl >= 1*/
+ cl = clamp(cl, vec3(0), vec3(1));
+
+ if ((cl.r+cl.g+cl.b) < 0.0031308)
+ return 12.92 * cl;
+
return 1.055 * pow(cl, vec3(0.41666)) - 0.055;
}
@@ -403,9 +408,7 @@ void main()
ambient = (1.0-ambient);
col.rgb *= ambient;
-
- col += atmosAffectDirectionalLight(max(min(da, 1.0), 0.0));
-
+ col += atmosAffectDirectionalLight(max(min(da, 1.0), 0.0));
col *= diffuse.rgb;
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));