diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl')
-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; } |