Hi Timothy, On Tuesday 01 February 2005 10:59, Timothy Miller wrote: > Nicolai Haehnle wrote: > > Since parallels and lengths are retained in the projection, there > > is no perspective correction going on (actually, the perspective > > correction just vanishes because both the OpenGL W and the W in the > > software model end up as 1) - but you obviously still want to use a > > depth buffer. > > > > This is where your assumption that Z and W can be easily > > interconverted using a fixed formula simply breaks down. > > Huh... you make a good point. I hadn't thought of that. Well, I > guess it's good that we catch such things now rather than when it's > too late, eh?
But it's incorrect. Orthographic projection is just a state variable of which both the driver and card are aware. It's still easy to convert depth buffer values back to the "correct" form, it's just a slightly different algorithm. As with perspective projection, the driver can handle this. By the way, glReadPixels isn't used by performance renderers because it usually is pathetically slow, and not only because of format conversions. It just has to work correctly, not be a speed demon. > Anyone got suggestions? Does Z need to be computed separately? Can > we just "turn off" W divide (but still use it for depth)? I still think it's unnecessary to interpolate Z. For orthographic projection, W would still be interpolated but the per-pixel divide would be disabled. Regards, Daniel _______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
