View Full Version : gl_BackColor weirdness (ATI driver problem?)

11-06-2005, 08:02 AM
Hello everybody,

I noticed some very strange flickering in my program that only happens on Windows using ATI's Catalyst 5.10 driver (on Radeon 9700 and X800 cards, couldn't test on other hardware). It doesn't happen on Linux or with older ATI drivers, and it doesn't happen with NVidia-based cards.

I've reduced the problem to a very simple test program which you can download in source form (http://homepages.upb.de/prefect/dev/ati-glsl-bug.zip) (requires SDL).

Here is the relevant vertex shader

varying vec4 TC;

void main()
gl_FrontColor = gl_BackColor = gl_Color;
TC = gl_MultiTexCoord0;
gl_Position = ftransform();
}and the fragment shader for reference:

varying vec4 TC;

void main()
gl_FragColor = TC;
}I'm rendering a single quad across the viewport with parameters that cause simple gradients to appear. However, with the system configuration mentioned above, I get extreme flickering that looks a bit as if TC were uninitialized in the fragment shader.

Curiously enough, if I remove the assignment to gl_BackColor in the vertex shader, everything works as it should.

So... am I missing something significant about how gl_FrontColor and gl_BackColor work?

11-08-2005, 04:52 AM
I think you're seeing the same problem as discussed here.