diff options
author | Oz Linden <oz@lindenlab.com> | 2013-01-11 18:52:27 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-01-11 18:52:27 -0500 |
commit | 7d56fb04dfdf47768e2e81ec80d15737370af271 (patch) | |
tree | 29a9188f7ad87c687afca4f26f6f75649f19a5f4 /indra/newview/app_settings/shaders/class2/windlight | |
parent | 597b374f382946b95d556af82cad612124b3211a (diff) | |
parent | de0863ed6e91fda0c1b5342b9fecf07c4af47d63 (diff) |
merge gamma correction rendering
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl | 4 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl index 765b0927c3..dd7de9f123 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl @@ -27,7 +27,7 @@ VARYING vec3 vary_SunlitColor; VARYING vec3 vary_AdditiveColor; VARYING vec3 vary_AtmosAttenuation; - +uniform float global_gamma; vec3 getSunlitColor() { return vec3(0,0,0); @@ -38,7 +38,7 @@ vec3 getAmblitColor() } vec3 getAdditiveColor() { - return vary_AdditiveColor; + return pow(vary_AdditiveColor, vec3(global_gamma)) * global_gamma; } vec3 getAtmosAttenuation() { diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl index 99dbee15ee..61f3088648 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl @@ -33,18 +33,20 @@ vec3 sunlit_color; vec3 amblit_color; vec3 position_eye; +uniform float global_gamma; + vec3 getSunlitColor() { - return sunlit_color; + return pow(sunlit_color, vec3(global_gamma)) * global_gamma; } vec3 getAmblitColor() { - return amblit_color; + return pow(amblit_color, vec3(global_gamma)) * global_gamma; } vec3 getAdditiveColor() { - return additive_color; + return pow(additive_color, vec3(global_gamma)) * global_gamma; } vec3 getAtmosAttenuation() { |