From: curt Date: Tue, 26 Nov 2002 02:29:03 +0000 (+0000) Subject: Having the runway lights "pop" in at a specific range is not 100% realistic. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=98dca167941d4fb16f77ba6ded3c9c2a40efacbe;p=flightgear.git Having the runway lights "pop" in at a specific range is not 100% realistic. I have updated the lighting code to use fog to try to fade the runway lights in smoothly, but still keep them from being visible until you are about 7-10 miles out, and then only have them be very faint at first. I think what I have is a bit nicer than before since it completely avoids the "popping" effect, but I've very open to tweaking the actual ranges based on people's real world experiences. --- diff --git a/src/Main/main.cxx b/src/Main/main.cxx index efde56729..ca3e7f413 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -467,8 +467,13 @@ void fgRenderFrame() { fog_exp_density = m_log01 / actual_visibility; fog_exp2_density = sqrt_m_log01 / actual_visibility; - rwy_exp2_punch_through = sqrt_m_log01 / ( actual_visibility * 2.5 ); - taxi_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); + } else { + rwy_exp2_punch_through = sqrt_m_log01 / ( 8000 * 2.5 ); + taxi_exp2_punch_through = sqrt_m_log01 / ( 8000 * 1.5 ); + } } // double angle; diff --git a/src/Objects/pt_lights.cxx b/src/Objects/pt_lights.cxx index c37e17330..d12a8733e 100644 --- a/src/Objects/pt_lights.cxx +++ b/src/Objects/pt_lights.cxx @@ -246,7 +246,7 @@ ssgTransform *gen_dir_light_group( const point_list &nodes, // put an LOD on each lighting component ssgRangeSelector *lod = new ssgRangeSelector; lod->setRange( 0, SG_ZERO ); - lod->setRange( 1, 12000 ); + lod->setRange( 1, 20000 ); lod->addKid( leaf ); // create the transformation.