gl_SecondaryColor Bug on ATI

I´m using the shaders as shown below. Unfortunately, the secondary color doesn´t work as supposed. After some tests I found out that already the vertex shader does not what it should.
The vertex-shader line “gl_FrontSecondaryColor=gl_SecondaryColor;” seems to copy the wrong color, instead of the secondary, the primary color gets stored in gl_FrontSecondaryColor.
I´m using Catalyst 4.6 on a R9800pro. The bug(?) is already present on Catalyst 4.5.
I´d be happy if anyone could confirm this bug or (the better case :slight_smile: show me what I´m doing wrong.

thx alot

PS: I AM using glSecondaryColor3fv() to upload the right color.

/*vertex shader */
varying vec3 normal;
varying vec3 viewvec;

void main()

/* fragment shader */

uniform samplerCube environmentmap;
uniform samplerCube radiancemap;
uniform sampler2D diffusetexture;
uniform sampler2D speculartexture;

varying vec3 normal;
varying vec3 viewvec;

void main()
	vec3 temp=normalize(normal);
	vec3 dir=reflect(viewvec, temp);
	gl_FragColor=textureCube(environmentmap, dir)*gl_SecondaryColor*texture2D(speculartexture, gl_TexCoord[0].xy);
	gl_FragColor+=textureCube(radiancemap, normal)*gl_Color*texture2D(diffusetexture, gl_TexCoord[0].xy);

Yes, this bug has been identified and will be fixed in a future driver release.

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