|
From: <axl...@us...> - 2009-08-30 13:30:30
|
Revision: 528
http://hgengine.svn.sourceforge.net/hgengine/?rev=528&view=rev
Author: axlecrusher
Date: 2009-08-30 13:30:24 +0000 (Sun, 30 Aug 2009)
Log Message:
-----------
update lights
Modified Paths:
--------------
Mercury2/Themes/default/Graphic/globalLight.frag
Mercury2/Themes/default/Graphic/pointLight.frag
Modified: Mercury2/Themes/default/Graphic/globalLight.frag
===================================================================
--- Mercury2/Themes/default/Graphic/globalLight.frag 2009-08-30 02:51:54 UTC (rev 527)
+++ Mercury2/Themes/default/Graphic/globalLight.frag 2009-08-30 13:30:24 UTC (rev 528)
@@ -50,6 +50,8 @@
float att = HG_LightColor.a / (HG_LightAtten.x + HG_LightAtten.y * dist +
HG_LightAtten.z * dist * dist);
+// att = 1.0;
+
vec3 diffuse = texture2D(HG_Texture1, coord).rgb;
vec3 R = reflect(-lightDir, norm);
Modified: Mercury2/Themes/default/Graphic/pointLight.frag
===================================================================
--- Mercury2/Themes/default/Graphic/pointLight.frag 2009-08-30 02:51:54 UTC (rev 527)
+++ Mercury2/Themes/default/Graphic/pointLight.frag 2009-08-30 13:30:24 UTC (rev 528)
@@ -36,11 +36,11 @@
vec3 lightDir = ecLight - pos;
float dist = length(lightDir);
+ if( dist > HG_LightAtten.w ) discard;
+
lightDir /= dist; //normalize
float NdotL = max(dot(norm, lightDir),0.0);
- if( dist > HG_LightAtten.w ) discard;
-
// float att = HG_LightColor.a / (HG_LightAtten.x + HG_LightAtten.y * dist+
// HG_LightAtten.z * dist * dist);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|