]> git.mxchange.org Git - flightgear.git/commitdiff
Having the runway lights "pop" in at a specific range is not 100% realistic.
authorcurt <curt>
Tue, 26 Nov 2002 02:29:03 +0000 (02:29 +0000)
committercurt <curt>
Tue, 26 Nov 2002 02:29:03 +0000 (02:29 +0000)
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.

src/Main/main.cxx
src/Objects/pt_lights.cxx

index efde56729700ba7314ef1fb83bfc73781ed2c6a5..ca3e7f413398ea36b092f9579ca29d650b81a436 100644 (file)
@@ -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;
index c37e17330e67e89f201e59db306a4a280faed38a..d12a8733e2338aca90050afb245a8234ce65586b 100644 (file)
@@ -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.