summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-28 18:50:10 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-28 18:50:10 -0800
commitf773b6ef9669bab6765678f8b07831144dd44a5e (patch)
treed1b9c206912f0db30465b36cff20a15556430b7d /indra/newview/app_settings
parentc413a0e096f8897ddc4ee5b5a627e6bf6cce39bb (diff)
cheaply resurrect the difference between spotlight and omnidirectional, as far as the shader is concerned.
not complete.
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
index 0f03e336be..b2d6d23b1e 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
@@ -33,7 +33,7 @@ float calcPointLight(vec3 v, vec3 n, vec4 lp, float la)
}
-float calcPointLight2(vec3 v, vec3 n, vec4 lp, vec3 ln, float la)
+float calcPointLight2(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_omnidirectional)
{
//get light vector
vec3 lv = lp.xyz-v;
@@ -48,7 +48,7 @@ float calcPointLight2(vec3 v, vec3 n, vec4 lp, vec3 ln, float la)
float da = clamp(1.0/(la * d), 0.0, 1.0);
//angular attenuation
- da *= calcDirectionalLight(-ln, lv) * calcDirectionalLight(n, lv);
+ da *= clamp(dot(-ln, lv)+is_omnidirectional, 0.0, 1.0) * calcDirectionalLight(n, lv);
return da;
}