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
commita831136347eebc92019c121c5834a7e0fe629eef (patch)
treeab1df62bceb42c820b51ce64747caa69c3e7f8bc /indra/newview/app_settings/shaders/class1/lighting
parent7e7331c0e5213ecfe4f563786239e497c197c630 (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;