Am Sa, den 01.01.2005 schrieb Roland Scheidegger um 19:00: > Felix Kühling wrote: > > Hi, > > > > I want to share an idea that I had, which drastically improves the depth > > buffer quality on Savage4 hardware. Maybe the same can be applied to > > different hardware too. > > > > Short version: reverse the depth range (z' = 1 - z) such that far > > coordinates map to z'=0 and near coordinates to z'=1. Then use a > > floating point format to store depth values in the depth buffer. Of > > course the hardware needs to support a floating point depth buffer. > > I'm a bit sceptical that this really improves depth buffer quality in > general. With D3D it is (if the hw supports it) possible to use a w > buffer instead of a z buffer, which has the same precision for far and > near objects. However, the loss of precision for near objects was often > considered unacceptable. (Radeon R100 and R200 support this, but R300 > and up no longer do, or at least the driver doesn't expose it, so it > looks like it wasn't that useful after all, and not many applications > afaik requested w buffers).
The Savage hardware can handle W buffers too. In fact I experimented with that and the quality looks good. But it doesn't work under all circumstances. If the viewing transformation is changed in the middle of rendering a frame, the meaning of W changes and depth ordering is messed up. As to loss of accuracy with near objects, I havn't seen any such problems yet with the applications I tested. OTOH, the improved quality of far objects is very noticeable for instance in FlightGear and TORCS. As Vladimir pointed out, it might be a problem for CAD applications though. Making float depth a configuration option would be a good idea. And I will have to support both in the driver anyway, since Savage3D-based hardware doesn't support floating point depth buffers. > > Roland -- | Felix Kühling <[EMAIL PROTECTED]> http://fxk.de.vu | | PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3 B152 151C 5CC1 D888 E595 | ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel