Radeon Gaps Problem

In our project we encountered a problem: Exclusively on ATI Radeon we have a gaps between geometry. The code, executed on Radeon and nVidia is equal, but results differ. I attached screenshots here. We tested it on Radeon HD5850 and Mobility Radeon HD5650 cards. Drivers was 10.6 and 10.8 both. Have anybody any suggestion?

Do the vertices in question have binary-identical position values? And do they use the same program to transform those positions (or proper use of the invariant qualifier)? These are the only conditions under which OpenGL provides a guarantee of seamless rendering. Unless these conditions are true (and odds are they are not, since one object is world geometry and the other is likely a door entity), OpenGL cannot guarantee that different hardware will compute the same values.

As i wrote, the code, executed on Radeon and nVidia is equal, without any vendor specific optimizations or something else differencies. It is difficult to find exactly this poligon coords, but we will try as soon as possible. Maybe this problem is caused by some sort of float precise differense (coords are floats)… Any more suggestion?

what you need to pay attention to:

  • is the same vertex shader used for both triangles on each side of the gap ?
  • is the blue color coming from the clear color, or is that a border color ?
  • does your fragment shader have any control flow with derivative/texture fetches ?
  • is the MVP computed by the OpenGL using the built in functions, and is it using very large/small float values ?

Thanks to all, problem was caused by alpha test, this feature sems to be works differently on nV and ATI.

Can you explain a bit more what you found to be different ?

The only thing, we have changed in our code is alpha test value - from 0.4 to 0.41, in result - no gaps. So it looks like there is difference in opengl internal calculations, some kind of sensitiveness. One more question - what is better for performance, enable alpha test for all objects, or just for theese, who use it? If not for all - we will need to switch on-off every frame and store alpha tested objects separatly, is it worth it?

First render all fully-opaque objects without alphatest,
then enable alphatest and render the transparent objects.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.