From 4c8266e0a25648cb346400119b0c5ad96de0627c Mon Sep 17 00:00:00 2001
From: Tofu Linden <tofu.linden@lindenlab.com>
Date: Thu, 28 Jan 2010 18:36:04 -0800
Subject: [PATCH] fix the shader dp light going negative!

---
 .../app_settings/shaders/class1/lighting/lightFuncV.glsl        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
index 211de830fae..0f03e336be2 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
@@ -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 *= dot(lv, -ln) * calcDirectionalLight(n, lv);
+	da *= calcDirectionalLight(-ln, lv) * calcDirectionalLight(n, lv);
 
 	return da;	
 }
-- 
GitLab