PDA

View Full Version : Geforce cards: Precision issues at triangle edges



Jan
01-13-2005, 01:35 AM
Hi

I have an urgent problem. I just ran my app on a Geforce 6 and i get heavy precision issues.

I render one pass and then blend another pass over that one. However, the blended pass seems to have a wireframe-overlay. It looks like the Geforce positions more than one pixel where the edges of two triangles touch. Because of additive blending the color then gets brighter, which leaves this wireframe look behind.

This ALWAYS happens. No matter, if i use shaders or not. And independet of the previous content of the framebuffer. I actually now blend only one simple textured pass over a black framebuffer and get those artifacts.

I use VBO and this happens with shared and non-shared vertices.

It also happens in immediate mode. I render shadow-volumes in immediate mode and the shadow is correct, but the volume is still visible, as if it was rendered in wireframe mode, because the values in the stencil buffer don't get zeroed out correctly.

Has anyone encountered this before? It doesn't happen on my Radeon. I would appreciate any hint, because i am under much time pressure to get this thing done (it should be done by tomorrow).

Thanks in advance,
Jan.

Jan
01-13-2005, 01:40 AM
Screenshot (http://www.artifactgames.de/IMAGES/Screenshot1.tga)

Sorry, cannot convert to jpeg at the moment.

Adrian
01-13-2005, 01:54 AM
Could it be something to do with GL_POLYGON_SMOOTH. Do you have that enabled?

Jan
01-13-2005, 01:56 AM
And another information: I also render a fullscreen quad in immediate mode. It is a QUAD, but of course the driver splits it into two triangeles. And guess what, i get a bright line between those two triangles.

See that white line over the knot? (http://www.artifactgames.de/IMAGES/Screenshot2.tga)

How could that be possible?? I set perspective_correction_hint to nicest, but that didn't change anything.

Jan.

Jan
01-13-2005, 02:00 AM
Adrian, how did you know that???

It works! Yeah! Thanks man, i would never have thought of that. And actually i still don't know why that would result in something like this.

Great!

Jan.

Tzupy
01-13-2005, 02:12 AM
The result of 'polygon smooth' depends on the selected blending mode: with the line AA blending mode you wouldn't have solved the problem (AFAIK). You should check how the smoothing behaves together with FSAA. It's also possible to see a performance drop because of it.

dorbie
01-13-2005, 10:05 AM
He knew because you can get a double contribution due to overlapping edge fragments with the wrong blend function.