summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
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/class2
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/class2')
-rwxr-xr-xindra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index dbb32c40f4..fa67c4ecea 100755
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -100,6 +100,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;
}
@@ -467,8 +472,6 @@ void main()
bloom = fogged.a;
#endif
-
-
col = srgb_to_linear(col);
//col = vec3(1,0,1);