diff options
author | Geenz <geenz@geenzo.com> | 2013-04-18 21:31:10 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-04-18 21:31:10 -0400 |
commit | b6a6479c372e311b45e27eafd368e2045ca21790 (patch) | |
tree | 9c01ed4b9af3a2cd4a784f6cbf2c25bacb8c4dfd /indra/newview/app_settings/shaders/class2/deferred | |
parent | 14b807e55efcfb8a9b52909fd554c9ba1cea0f36 (diff) |
Mitigation for light attenuation looking different with gamma correction. Assume that light attenuation wants to be linearized before we apply gamma correction.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl | 1 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl index 31f5c8afbb..cb8d1f6910 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl @@ -184,6 +184,7 @@ void main() float fa = falloff+1.0; float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0); + dist_atten = pow(dist_atten, 2.2) * 2.2; if (dist_atten <= 0.0) { discard; diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl index 65a14c542c..87180fd3e4 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl @@ -185,6 +185,7 @@ void main() float fa = falloff+1.0; float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0); + dist_atten = pow(dist_atten, 2.2) * 2.2; if (dist_atten <= 0.0) { discard; |