View Full Version : polygon intersection artifacts

06-24-2003, 07:59 PM
can someone explain to me how these polygon intersection artifacts can be fixed?
www.bol.ucla.edu/~btang/ack3.jpg (http://www.bol.ucla.edu/~btang/ack3.jpg)

06-24-2003, 08:08 PM
I am assuming you are talking about the water and if so there is a simple solution because i had a similar problem programming games. It may have something to do with your clipping plane range settings. In my experience, when the clipping plane nearest setting is set to lower than 0.1f those artifacts become more and more prominent. I would suggest not going much lower than 0.1f. I am not entirely sure why this happenens but i bet it has something to do with the way OGL calculates pixels for the viewport.

06-24-2003, 08:19 PM
hmmm thanks for your advice, but that's not it. i am at 1.0f and it still looks like that. somehow the warcraft 3 engine gets rid of it completely

06-25-2003, 01:52 AM
This is definitely your z buffer precision.

Push your near clip plane out as much as you can, and pull your far clip plane in as much as you can. Remember you can make them dynamic based on the tilt of the viewer to help out.

That will solve your problem. You could also try requesting a larger depth buffer in the pixel format descriptor.

06-25-2003, 10:56 AM
thanks, i figured that out last night at 4 AM =)