diff options
author | Graham Linden <graham@lindenlab.com> | 2013-07-25 09:36:13 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2013-07-25 09:36:13 -0700 |
commit | f357269c38a8627aeb67c82c5ee34b49336e0d8b (patch) | |
tree | 1bc688e9548a02799d5c90817193f1a851c74edc /indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl | |
parent | 24cef8d36b13c02ec06c58cc66d9bce040891069 (diff) |
NORSPEC-325 WIP restore gamma (uncorrected) attenuation and unify sRGB conversion in one place
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl')
-rwxr-xr-x | indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl index 544a0a6730..cfb483ab54 100755 --- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl @@ -85,15 +85,8 @@ vec3 decode_normal (vec2 enc) return n; } -vec3 srgb_to_linear(vec3 cs) -{ - -/* { cs / 12.92, cs <= 0.04045 - cl = { - { ((cs + 0.055)/1.055)^2.4, cs > 0.04045*/ - - return pow((cs+vec3(0.055))/vec3(1.055), vec3(2.4)); -} +vec3 srgb_to_linear(vec3 cs); +vec3 linear_to_srgb(vec3 cl); vec4 correctWithGamma(vec4 col) { @@ -204,7 +197,7 @@ void main() proj_tc.xyz /= proj_tc.w; - float fa = falloff; + float fa = falloff+1.0; float dist_atten = min(1.0-(dist-1.0*(1.0-fa))/fa, 1.0); dist_atten *= dist_atten; dist_atten *= 2.0; |