diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-28 18:50:10 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-28 18:50:10 -0800 |
commit | ae75d7b9dc3bac4a77068a3c7551ff70e8759a44 (patch) | |
tree | f3b1eb76b04d0424a0c6a21ff286f822acd3922e /indra/newview/app_settings/shaders/class1/lighting | |
parent | 4c8266e0a25648cb346400119b0c5ad96de0627c (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/shaders/class1/lighting')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl | 4 |
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; } |