Extract from the terrain shader:
Code:
[[FS_AMBIENT]]
uniform vec4 sunDir;
uniform sampler2D heightNormMap, detailMap;
varying vec2 texCoords;
vec3 light = -normalize( sunDir.xyz );
void main( void )
{
vec3 detailMap = texture2D( detailMap, texCoords * 300.0 ).rgb;
Here, detailMap is declared as a vec3, but used as a sampler in the same line. The open source nvidia driver chokes on this while the proprietary ones go over this happily. This does not work in C/C++, is it really valid in GLSL?
EDIT: The GLSL specs seem to say this is okay. I'll probably hack on Mesa a bit now

EDIT2:
Quote:
It's probably incorrect in our compiler.
You're best off playing it safe and using another variable name. I wouldn't be surprised if other GLSL compilers got this wrong too.
-Brian
I think this advice might be right.