PDA

View Full Version : Best way to camouflage precision errors



holdeWaldfee
02-23-2006, 08:16 AM
I have the problem that a lot of fragments from the bright background sneak through back face culled meshes with big triangles.

Is there a cheap way to minimize this effect?

dorbie
02-23-2006, 09:34 AM
OpenGL will fill all pixels if the mesh is properly constructed. Usually the problem you are seeing is caused by T junction vertices, where you have a vertex in the middle of one edge but not the other. OpenGL fill rules do not guarantee that all fragments will be filled in this case(it's impossible with limited precision).

To fix this add a vertex to edges on the unbroken edge of each T vertex.

holdeWaldfee
02-23-2006, 11:21 AM
Thanks