summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-28 21:49:31 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-28 21:49:31 -0800
commitc086f06be69e156c49a61bec1d13062cc50cfd09 (patch)
tree273240674c7efbc9cda3398f9ce6be58f3799d9a
parentc67c7ddd63c06e4e4f0a25a2ef23b941b85dd7bf (diff)
cheaper, cuter way to deal with spot vs point in the shader
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
index b2d6d23b1e..4525bf80b2 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
@@ -48,7 +48,7 @@ float calcPointLight2(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_omnid
float da = clamp(1.0/(la * d), 0.0, 1.0);
//angular attenuation
- da *= clamp(dot(-ln, lv)+is_omnidirectional, 0.0, 1.0) * calcDirectionalLight(n, lv);
+ da *= max(dot(-ln, lv),is_omnidirectional) * calcDirectionalLight(n, lv);
return da;
}