]> git.mxchange.org Git - flightgear.git/commitdiff
Don't force ground lighting to have the same limited visibility as runway
authorcurt <curt>
Tue, 26 Nov 2002 16:01:39 +0000 (16:01 +0000)
committercurt <curt>
Tue, 26 Nov 2002 16:01:39 +0000 (16:01 +0000)
lighting.

src/Main/main.cxx

index ca3e7f413398ea36b092f9579ca29d650b81a436..19d7c934ede8e7afa60bafca60a17c589da4dddc 100644 (file)
@@ -222,6 +222,7 @@ static GLfloat fog_exp_density;
 static GLfloat fog_exp2_density;
 static GLfloat rwy_exp2_punch_through;
 static GLfloat taxi_exp2_punch_through;
+static GLfloat ground_exp2_punch_through;
 
 #ifdef FG_NETWORK_OLK
 ssgSelector *fgd_sel = NULL;
@@ -467,6 +468,7 @@ void fgRenderFrame() {
 
         fog_exp_density = m_log01 / actual_visibility;
         fog_exp2_density = sqrt_m_log01 / actual_visibility;
+        ground_exp2_punch_through = sqrt_m_log01 / (actual_visibility * 1.5);
         if ( actual_visibility < 8000 ) {
             rwy_exp2_punch_through = sqrt_m_log01 / (actual_visibility * 2.5);
             taxi_exp2_punch_through = sqrt_m_log01 / (actual_visibility * 1.5);
@@ -801,6 +803,7 @@ void fgRenderFrame() {
 #endif
 
         // draw ground lighting
+       glFogf (GL_FOG_DENSITY, ground_exp2_punch_through);
        ssgCullAndDraw( globals->get_scenery()->get_gnd_lights_root() );
 
        if ( fgGetBool("/sim/rendering/skyblend") ) {