]> git.mxchange.org Git - flightgear.git/commitdiff
Adjust fog color.
authorehofman <ehofman>
Mon, 26 Oct 2009 09:46:05 +0000 (09:46 +0000)
committerTim Moore <timoore@redhat.com>
Mon, 26 Oct 2009 17:54:40 +0000 (18:54 +0100)
src/Time/light.cxx

index c1d204ac339b4e289a040150951caf5379bc5274..20cf3daf8a0f10ddebe335c727fdbecf20ed7ece 100644 (file)
@@ -170,10 +170,10 @@ void FGLight::unbind () {
     prop->untie("/rendering/dome/sun/red");
     prop->untie("/rendering/dome/sun/green");
     prop->untie("/rendering/dome/sun/blue");
-    prop->untie("/rendering/dome/skyred");
+    prop->untie("/rendering/dome/sky/red");
     prop->untie("/rendering/dome/sky/green");
     prop->untie("/rendering/dome/sky/blue");
-    prop->untie("/rendering/dome/fogred");
+    prop->untie("/rendering/dome/fog/red");
     prop->untie("/rendering/dome/fog/green");
     prop->untie("/rendering/dome/fog/blue");
 }
@@ -200,7 +200,7 @@ void FGLight::update_sky_color () {
     // if the 4th field is 0.0, this specifies a direction ...
     // const GLfloat white[4]          = { 1.0,  1.0,  1.0,  1.0 };
     const GLfloat base_sky_color[4] = { 0.31, 0.43, 0.69, 1.0 };
-    const GLfloat base_fog_color[4] = { 0.84, 0.87, 1.0,  1.0 };
+    const GLfloat base_fog_color[4] = { 0.60, 0.70, 0.9,  1.0 };
 
     SG_LOG( SG_EVENT, SG_DEBUG, "Updating light parameters." );
 
@@ -330,9 +330,9 @@ void FGLight::update_adj_fog_color () {
     // Calculate the fog color in the direction of the sun for
     // sunrise/sunset effects.
     //
-    float s_red =   color[0]*color[0];
-    float s_green = color[1]*color[1];
-    float s_blue =  color[2];
+    float s_red =   color[0]*color[0]*color[0];
+    float s_green = color[1]*color[1]*color[1];
+    float s_blue =  color[2]*color[2];
 
     // interpolate beween the sunrise/sunset color and the color
     // at the opposite direction of this effect. Take in account