David Megginson <[EMAIL PROTECTED]> said:

> For example, let's say that at a certain distance we need the lights
> to be 50 ft away from the ground to avoid z-buffer problems.  If I'm
> looking at the airport from 2 miles away at 1,000ft AGL, then my view
> has slope of about 1:10, so the lights need to be lifted only about
> 5ft from the ground to get 50ft between them and the ground directly
> behind (from my current viewing angle).
> 
> Does this make sense to the math types?

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. 

Best,

Jim


Index: src/Scenery/tileentry.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Scenery/tileentry.cxx,v
retrieving revision 1.13
diff -r1.13 tileentry.cxx
914c914
<             sgScaleVec3( lift_vec, 0.0 + agl / 20.0 );
---
>             sgScaleVec3( lift_vec, 0.0 + agl / 150.0 );
957c957
<             sgScaleVec3( lift_vec, 0.0 + agl / 20.0 );
---
>             sgScaleVec3( lift_vec, 0.0 + agl / 150.0 );



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to