On Sun, Oct 22, 2000 at 10:46:52PM 0700, Timothy Wojtaszek wrote:
 To handle coplanar polygons, Avenger also supports depth biasing. To
 guarantee that polygons which are coplanar are rendered correctly,
 individual triangles may be biased with a constant depth value  this
 effectively accomplishes the same function as stenciling used in more
 expensive graphics solutions but without the additional memory costs.

 Any one willing to explain this further??
I'm not sure what you'd like to know. Here's a brief overview.
Many applications use "decal" geometry  polygons or lines
representing detailed imagery that are applied to the surface of a
(usually larger) base polygon. Some examples:
* Centerline on a runway or road. Decal polygons look clean
and sharp from any angle, while mipmapped textures look
fuzzy from angles near 45 degrees.
* Smudge marks on walls or floors. Decal polygons can be
reused in many places, and can be applied dynamically
(after a simulated explosion, for instance) without having
to modify the underlying surface texture.
There are several ways to implement decals. Some examples:
* Multipass, using stencilling. In short, this involves drawing
the base polygon while simultaneously setting stencil planes,
then drawing the decal polygon in the stencilled area. It's a
bit more complicated; I can give you a reference if you want
one. This generally yields the highestquality result, but is
not as fast as the alternatives.
* Reference plane. Draw the base polygon, using its depth
slopes to define a "reference plane." Draw the decal
polygon(s) using special hardware that generates depthbuffer
values from the reference plane, rather than the polygons
themselves. This allows depth comparisons for equality to
yield correct results. Quality is essentially as good as
stencilling, but if you have the necessary special hardware
performance is significantly better.
* Depth bias using glPolygonOffset() or equivalent. This adds
an offset to depth values so that the decal polygon(s) can be
drawn on top of the base polygons while guaranteeing that the
two are cleanly separated (thus allowing depth comparisons to
yield good results). The separation distance is computed from
the slope of the base polygon plus an additional constant
offset amount, so that polygons or lines of differing depth
slopes can be overlayed. Fast, but quality is not as good as
the first two methods.
* Depth bias by changing the projection matrix. This is
essentially the same as glPolygonOffset(), but restricted to
representing depth biases that aren't related to the slope of
the base polygon. Fastest method, but also the leastgeneral
and the one most subject to rendering artifacts.
Allen
