[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Texture mapping co-ordinates



Katie Lucas wrote:

> Actually, talking of numerical imprecision, I've got some artifacts
> caused by limited precision in the depth buffer, but I can't recall
> how you set up OpenGL to avoid this (In glide it's something like
> "use a W buffer rather than a Z buffer) ?

Using a W buffer helps over some portion of the range of depths and
makes matters worse over other parts.  You only have 16 bits - and
all you can possibly do is re-map how they are applied.  It's *really*
hard to get rid of depth artifacts on systems with 16 bit Z - fortunately,
all modern boards have 32 bits which *largely* makes the problem go away.
 
> I had a play with glDepthRange(), but I can't really see how fiddling
> with that would help..

You need *another* of my OpenGL FAQ's:

  http://web2.airmail.net/sjbaker1/love_your_z_buffer.html

...bottom line - push your near clip plane out as far from your eye
as you possibly can.  Don't fiddle with glDepthRange - it won't help.

You might want to read the other OpenGL FAQ's I've written:

  http://web2.airmail.net/sjbaker1/omniv.html

----------------------------- Steve Baker -------------------------------
HomeMail : <sjbaker1@airmail.net>   WorkMail: <sjbaker@link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net       http://tuxaqfh.sf.net
           http://prettypoly.sf.net http://tuxkart.sf.net
           http://freeglut.sf.net   http://toobular.sf.net