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

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-serv21497

Modified Files:
	urban.frag 
Log Message:
Night lighting improvement suggested by Erik Hofman

Index: urban.frag
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Shaders/urban.frag,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- urban.frag	23 Mar 2010 22:20:24 -0000	1.3
+++ urban.frag	28 Mar 2010 16:54:26 -0000	1.4
@@ -92,6 +92,8 @@
 	if ( shadow_factor < 1.0 )
 		ambient_light = constantColor + gl_LightSource[0].diffuse * shadow_factor * vec4(diffuse, 1.0);
 	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));
 
 	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.