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