summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/lighting
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-29 00:22:13 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-29 00:22:13 -0800
commitd0cf5b03f4fec29db367d8f1f387f2b0996f67e6 (patch)
tree874614914ddd9b72a9aabdee099fe4e4089266a3 /indra/newview/app_settings/shaders/class1/lighting
parentfcaca49a9496154419a8f44c17cba16b028d3518 (diff)
spot-aware light func usage in ALL shaders.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/lighting')
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl22
1 files changed, 1 insertions, 21 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
index 2e41f24afe..d0f58cc1a4 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
@@ -12,28 +12,8 @@ float calcDirectionalLight(vec3 n, vec3 l)
return a;
}
-float calcPointLight(vec3 v, vec3 n, vec4 lp, float la)
-{
- //get light vector
- vec3 lv = lp.xyz-v;
-
- //get distance
- float d = length(lv);
-
- //normalize light vector
- lv *= 1.0/d;
-
- //distance attenuation
- float da = clamp(1.0/(la * d), 0.0, 1.0);
-
- //angular attenuation
- da *= calcDirectionalLight(n, lv);
-
- return da;
-}
-
-float calcPointLight2(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_omnidirectional)
+float calcPointlightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight)
{
//get light vector
vec3 lv = lp.xyz-v;