Problem using generic attributes

Hello,

I’m currently having a problem using generic attributes.
Alright here it comes:
this is my vertex shader:

uniform float nuMin;"+
uniform float nuMax;
attribute vec3 re;
void main() {
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

gl_FrontColor = vec4(re.x, 0.0, 0.0, 1.0);
}

and this is my fragment-shader:

void main() {
gl_FragColor = gl_Color;
}

]
if I run them with my terrain (this is just a minimal test-case for a geomorphing shader that tripped it up), the rendered mesh looks right, except I do get some kind of flickering, even when I don’t move the camera at all.
Once I remove the reference to the generic attribute “re” from the gl_FrontColor call, it runs just fine.
Even just doing a
float tmp = re.x;
results in the mentioned flickering (looks like the background shining through in certain frames).
I’m passing the VertexAttrib as a vertex array. The values appear to be right (at least the resulting colors seem right to me).
I’m running an ATI Radeon 9800 with Catalyst 4.2.

is anybody else experiencing something similar or has any idea, what could cause this?

Thanks a lot for your answers as I just can’t think of anymore to try.

Jan

Hello!

I got exactly the same problem!! Try to pass the vec3 as a gl_MultiTexCloordX like this:

uniform float nuMin;"+

uniform float nuMax;

//attribute vec3 re;
#define re vec3(gl_MultiTexCoord1)

void main() {

gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

gl_FrontColor = vec4(re.x, 0.0, 0.0, 1.0);

}

And then pass the values via glTexCoordPointer(). This worked for me.

I think that’s an ATI driver bug. I sent a mail at devrel@ati.com 3 days ago but till now no answer…

Always good to know, you are not the only one and are not just too stupid to get it to run.

I guess now, ATI has two reports (had already send out mine).
Let’s hope, they’ll fix it soon. Thanks for the tip with the MultitexCoord, I’ll just do that.

Jan

I just got a mail from ATI devrel. They said that it will be resolved in one the next releases.

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