One of my users is having trouble running my application as he is facing this issue on startup:
These are his specifications:
OpenGL Version: 3.3.0
ShadingLanguageVersion: 3.30 NVIDIA via Cg compiler
OpenGL Renderer: Quadro FX 1700/PCIe/SSE2
OpenGL Vendor: NVIDIA Corporation
The problem fragment shader is:
layout (location = 0) out vec4 gColor;
layout (location = 1) out vec4 gNormal;
in vec2 UV;
flat in vec4 normal;
flat in float texID;
in vec3 position;
uniform sampler2D texColour;
uniform sampler2D colourTexture[16];
uniform sampler2D normalTexture[16];
void main()
{
if (texID == 0)
{
vec4 c = texture(texColour, UV);
gColor = vec4(c.rgb * normal.w, c.a);
gNormal = vec4(normal.xyz, 1.0);
}
else
{
vec4 n = texture(normalTexture[int(texID)], UV);
// This line has the issue:
gColor = vec4(texture(colourTexture[int(texID)], UV).rgb * normal.w, 0.0);
gNormal = vec4(normalize(n.xyz * 2.0 - 1.0), n.w);
}
}
The issue seems to be with invoking texture(...).rgb
in-line, and is the same issue faced by this developer back in 2009 (New NV driver breaks my app (190.38) - I can’t post the link as I am a new user). The solution for them was to update to the latest drivers as it was a GLSL compile issue, however this did not solve the problem in my case as he has recently updated his drivers.
Any help with this would be greatly appreciated.