David Megginson <[EMAIL PROTECTED]> said: > Jim Wilson writes: > > > 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. > > Shouldn't the lights be lifted less at shallow viewing angles? The > extreme case is sitting on a horizontal runway looking directly > between the lights and the ground.
That would be, up close, but as you move a greater distance from the lights the perspective makes the lights and ground merge together. At some point the ground plane and the plane the lights on converge to the same display pixel on your screen, so then a decision about which pixel is show (the light or the ground) needs to be made. As long as the mathematical precision can detect that the light is closer to the camera then the light will show. If the mathematical precision is insufficient to differentiate reliably then you get "z-buffer fighting" and light pixels will randomly pop in and out depending on the way the math errors go from frame to frame. The important part to remember is this: at shallow viewing angles, the difference between the distance from the camera to the light and the distance from the camera to the dot on the ground right below it, is very tiny. As you move up and the viewing angle becomes steeper the "difference" becomes closer to the height of the light above the dot on the ground behind it. I think you'll find that patch does a pretty good job. Regardless of whether we add in the distance component or not, you won't see better from 5000ft flying by within a mile or two of the field. Best, Jim _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
