]> git.mxchange.org Git - flightgear.git/commitdiff
Update the ambient, diffuse and specular scenery colors to match the real world more...
authorehofman <ehofman>
Sun, 3 Aug 2003 09:54:02 +0000 (09:54 +0000)
committerehofman <ehofman>
Sun, 3 Aug 2003 09:54:02 +0000 (09:54 +0000)
src/Time/light.cxx

index 43549db6281dfa2187dcaa18ca4063f8a8c40523..4798ba7293a9a5b60c81fd2d5a38f58d0f553683 100644 (file)
@@ -159,15 +159,15 @@ void fgLIGHT::Update( void ) {
 
     float *sun_color = thesky->get_sun_color();
 
-    scene_ambient[0] = fog_color[0] * ambient;
-    scene_ambient[1] = fog_color[1] * ambient;
-    scene_ambient[2] = fog_color[2] * ambient;
-    scene_ambient[3] = 1.0;
-
-    scene_diffuse[0] = fog_color[0] * diffuse;
-    scene_diffuse[1] = fog_color[1] * diffuse;
-    scene_diffuse[2] = fog_color[2] * diffuse;
-    scene_diffuse[3] = 1.0;
+    scene_ambient[0] = (sun_color[0]*0.1 + cloud_color[0]*0.9) * ambient;
+    scene_ambient[1] = (sun_color[1]*0.1 + cloud_color[1]*0.9) * ambient;
+    scene_ambient[2] = (sun_color[2]*0.1 + cloud_color[2]*0.9) * ambient;
+    scene_ambient[3] = 1.5;
+
+    scene_diffuse[0] = (sun_color[0]*0.25 + fog_color[0]*0.75) * diffuse;
+    scene_diffuse[1] = (sun_color[1]*0.25 + fog_color[1]*0.75) * diffuse;
+    scene_diffuse[2] = (sun_color[2]*0.25 + fog_color[2]*0.75) * diffuse;
+    scene_diffuse[3] = 1.5;
 
     scene_specular[0] = sun_color[0] * specular;
     scene_specular[1] = sun_color[1] * specular;