]> git.mxchange.org Git - flightgear.git/commitdiff
Patch from Jim Wilson:
authordavid <david>
Mon, 4 Nov 2002 02:17:13 +0000 (02:17 +0000)
committerdavid <david>
Mon, 4 Nov 2002 02:17:13 +0000 (02:17 +0000)
That's a little too small to resolve differences at 16bpp. Try the
patch below.  It decreases the lifting substantially.  You will see
a slight increase in z-buffer flickering but it isn't bad.  Note
that we removed the "distance" component the other day,  the purpose
of it was to lift the lights higher when viewed at shallow viewing
angles.  The distance component is critical for the street lights that
can be very long distances away.

But with the distances we're working with here it really doesn't
do all that much.  The factor used in this patch is about as shallow
a lift as can be used when looking straight down at the airport.  At
24bpp there's no effect from incorporating a distance component.

The choice is to reintroduce a distance component...one that works (and
only for 16bpp), or alter the factor used in the patch below to strike an
acceptable balance between different viewing angles when in 16bpp mode.

src/Scenery/tileentry.cxx

index d8ba4e880a77f719efaaa78c9943c92343d98756..2df901c2aa8eeeb38e2417a6254db8011a416a40 100644 (file)
@@ -911,7 +911,7 @@ void FGTileEntry::prep_ssg_node( const Point3D& p, sgVec3 up, float vis) {
         if ( general.get_glDepthBits() > 16 ) {
             sgScaleVec3( lift_vec, 0.0 + agl / 500.0 );
         } else {
-            sgScaleVec3( lift_vec, 0.0 + agl / 20.0 );
+            sgScaleVec3( lift_vec, 0.0 + agl / 150.0 );
         }
 
         sgVec3 lt_trans;
@@ -954,7 +954,7 @@ void FGTileEntry::prep_ssg_node( const Point3D& p, sgVec3 up, float vis) {
         if ( general.get_glDepthBits() > 16 ) {
             sgScaleVec3( lift_vec, 0.0 + agl / 500.0 );
         } else {
-            sgScaleVec3( lift_vec, 0.0 + agl / 20.0 );
+            sgScaleVec3( lift_vec, 0.0 + agl / 150.0 );
         }
 
         sgVec3 lt_trans;