CVS: data/Shaders urban.frag,1.4,1.5

Frederic Bouvier <[email protected]>
Newsgroups gmane.games.flightgear.cvc
Message-ID <[email protected]>
Update of /var/cvs/FlightGear-0.9/data/Shaders
In directory baron.flightgear.org:/tmp/cvs-serv22067/Shaders

Modified Files:
	urban.frag 
Log Message:
Put the color of night lighting in a uniform

Index: urban.frag
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Shaders/urban.frag,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- urban.frag	28 Mar 2010 16:54:26 -0000	1.4
+++ urban.frag	28 Mar 2010 17:23:06 -0000	1.5
@@ -17,6 +17,7 @@
 uniform sampler2D NormalTex;
 uniform float depth_factor;
 uniform float tile_size;
+uniform vec3 night_color;
 
 const float zFar = 120000.0;
 const float zNear = 100.0;
@@ -94,7 +95,7 @@
 	float emission_factor = (1.0 - smoothstep(0.15, 0.25, reflectance)) * emis;
 	vec4 tc = texture2D(BaseTex, uv);
 	emission_factor *= 0.5*pow(tc.r+0.8*tc.g+0.2*tc.b, 2) -0.2;
-	ambient_light += (emission_factor * vec4(0.75, 0.59, 0.05, 0.0));
+	ambient_light += (emission_factor * vec4(night_color, 0.0));
 
 	vec4 finalColor = texture2D(BaseTex, uv) * ambient_light;
 


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.