On Tue, 1 Feb 2005 23:11:33 -0500, Daniel Phillips <[EMAIL PROTECTED]> wrote:
> 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.

We're not talking about converting the depth buffer.  We're talking
about using Z values without applying perspective foreshortening.

Also, the driver (Mesa, actually) handles vertex projection, but the
hardware has to do relevant fragment computations.

> 
> 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.

Well, we can make it fast.  The framebuffer is in a good format, and
we can use DMA, etc.

There are lots of things that driver writers neglect.  Looking at a
lot of old Xfree drivers, they completely ignore things like tile and
stipple fills.  Indeed, at work, I was told that they weren't a
priority.  Well, being a fanatic, I accelerated them anyway (stipple
fills for our Raptor 2000 card came out over 100 times faster when
accelerated than when we just punted to cfb).  It turned out that one
of our customers really needed this.

Just because someone else is short-sighted doesn't mean we have to be also.

> > 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.

That makes sense... but Nicolai mentioned that there are other
projections besides just orthographic and perspective.  Something
about infinity, etc.

Really, adding Z wasn't that big of a deal.  We can talk more about
that when it comes time to axe features.  :)
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to