diff options
author | Dave Parks <davep@lindenlab.com> | 2013-04-30 14:49:53 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-04-30 14:49:53 -0500 |
commit | b06ec66a5d11628905da256e084d0036f39ba529 (patch) | |
tree | a9a2f77ac83b9345eb8bed5e67c73c1b1f8aa822 | |
parent | ad9e30817411b373baf73e63653ad6d10661e35f (diff) |
MATBUG-78 Fix for alpha lighting distance attenuation not matching opaque distance attenuation
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 1 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 737c658126..e2fe4a1e9e 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -85,6 +85,7 @@ vec3 calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float //distance attenuation float dist2 = d/la; da = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0); + da = pow(da, 2.2) * 2.2; // spotlight coefficient. float spot = max(dot(-ln, lv), is_pointlight); diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index 13b629a6c8..d2e85ba8a0 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -91,6 +91,7 @@ vec3 calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float //distance attenuation float dist2 = d/la; da = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0); + da = pow(da, 2.2) * 2.2; // spotlight coefficient. float spot = max(dot(-ln, lv), is_pointlight); |