diff options
author | Graham Linden <graham@lindenlab.com> | 2018-11-12 15:54:53 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-11-12 15:54:53 -0800 |
commit | a49e2b604e6b505e083e24b10e39053196d917c1 (patch) | |
tree | 931c403bcc66f9831b595b1aeb54534e5a5eff4a /indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl | |
parent | bdf4442e216273bb32eeb607857efdad2336ee81 (diff) |
SL-10044 SL-10045
Fix class 1 and 2 transport/gamma funcs and made usage consistent across all shaders.
Fix class1\environment\waterV reverting to old d1/d2 names for wave directions.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl index 187876acf7..6401845af2 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl @@ -36,10 +36,10 @@ vec3 scaleSoftClipFrag(vec3 light) { return light; } - //soft clip effect: - light = 1. - clamp(light, vec3(0.), vec3(1.)); - light = 1. - pow(light, gamma.xxx); - return light; + //soft clip effect: + light = 1. - clamp(light, vec3(0.), vec3(1.)); + light = 1. - pow(light, gamma.xxx); + return light; } vec3 scaleSoftClip(vec3 light) @@ -47,13 +47,12 @@ vec3 scaleSoftClip(vec3 light) return scaleSoftClipFrag(light); } -vec3 fullbrightScaleSoftClipFrag(vec3 light) -{ - return scaleSoftClipFrag(light.rgb); +vec3 fullbrightScaleSoftClipFrag(vec3 light) { + return mix(scaleSoftClip(light.rgb), light.rgb, getAtmosAttenuation()); } vec3 fullbrightScaleSoftClip(vec3 light) { - return fullbrightScaleSoftClipFrag(light.rgb); + return fullbrightScaleSoftClipFrag(light); } |