Stephen J Baker wrote:
> 
> On Thu, 29 Apr 1999, C.J. Beyer wrote:
> 
> > Btw. Is there anyone working on adding polygon_offset support for FX Mesa.
> > It's used in Quake3. It doesn't seem to hard to implement at all.
> >
> > Any toughs where/how should it implemented?
> 
> I can expect some hidden 'gotcha's.
> 
> The *obvious* thing is just to move the polygon in Z as a function
> of slope. However, if you do that, the offset polygon will (I think)
> fog differently.  At extreme slopes, this will become quite noticable
> I suspect. Imagine a decal on a bad guy's jacket. Every time he
> turns so the decal is nearly edge on, glPolygonOffset will apply
> increasing amounts of Z, bringing the decal closer to the eye
> with the effect that although the bad guy is hiding in the fog,
> every time he turns around, his decal shines like a beacon through
> the fog.
> 
> glPolygonOffset really sucks.
> 
> I could imagine other things that might break too (like texture
> perspective correction) - but those are harder to think about.
> 
> The trick that I have been using in the absence of a working glPolygonOffset
> (which is to move the near clip plane a touch) avoids that problem
> but is costly because it causes the fog tables to be recomputed.

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.

Keith


_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to