Hi,

I'm writing a small OpenGL 2.0 application on Windows XP. GPU in my machine is old Radeon X550. In the middle of development, after switching from SDL 1.2 to SDL 2 and refreshing GPU drivers to latest from AMD website (due to some display trashing), I cannot seem to get anything but {0, 0, 0, 0} from textureCube() calls inside fragment shaders.

I made a trivial cubemap shader to test things out but the problem persisted. Oddly enough, prior to driver reinstall, the cubemap lookup was working as expected inside the large shader with 8 more texture samplers. I tested this trivial shader on another Windows 7 machine with GeForce GT525, and it worked fine there.

According to gdebuger the cubemap is properly setup and bound to the right texture unit. The only oddity I could notice is the shader validation warning. Upon setting the samplerCube uniform value, the validation says: "Validation warning! - Sampler value environmentTex has not been set in fragment shader." Which is strange because querying the said samplerCube variable just before validation returns the right texture unit number.

Here's the trivial shader version that still gives me only black pixels:
Code :
varying vec3 normal;
 
void main()
{	
	normal = normalize(gl_NormalMatrix * gl_Normal);
	gl_Position = ftransform();
}
Code :
varying vec3 normal;
uniform samplerCube environmentTex;
 
void main(){
	gl_FragColor = textureCube(environmentTex, normalize(normal));
}

Any help is greatly appreciated as I'm pretty much out of ideas here. It looks like some kind of driver issue but I don't exclude the possibility that I'm unknowingly doing something semi-stupid on the CPU side and it irritates the GPU.