Stephen J Baker wrote:
> 
> On Fri, 30 Apr 1999, Mikl[ISO-8859-1] ós Fazekas wrote:
> 
> > Hello!
> >
> > > Certainly too costly to do per triangle.  The options open to us for the
> > > FX driver both require us to calculate the area of each triangle, and
> > > either use this value to nudge the Z coordinates, or trust glide and
> > > call grDepthBias (or what ever it is called) for each triangle.  Either
> > > way it means we are duplicating some of what must happen inside
> > > grDrawTriangle.
> >
> > Do anybody know the exact specification of grDepthBiasLevel ? Will it simply
> > add the parameter value/65535.0 to the generated pixel's z-fragment? The
> > glide manual isn't clear for me about this.
> 
> I don't have a GLIDE manual - but I imagine that grDepthBiasLevel doesn't
> know anything about the slope of the polygon.
> 
> Is there going to be a big overhead in calculating that?

This is one area where a binary-only driver lets us down.  If 3dfx is
anything like the g200 hardware, then the function of grDrawTriangle is
to compute the area of the triangle and hence the slopes of everything
that must be interpolated across the triangle.  It feeds this down to
the hardware, either all three vertices at once, or perhaps like the
g200, breaking the triangle up into 2 degenerate quadrilaterals.

In any case, grDrawTriangle almost certainly computes the area, and we
must also compute the area to do glPolygonOffset.  This plus living with
the inconvenience and unknown mechanism of grDepthBias are the
compromises ncessary for slope-dependent triangle offset using glide.

I would rate these as regrettable annoyances for the implementor (hi!)
but otherwise nothing to get in a tizz about.

Keith


Reply via email to