Greetings!
I recently updated my NVIDIA GeForce driver to version 364.72, and a shader program that worked perfectly fine before does not seem to compile anymore. I realize this is not technically an LWJGL problem (at least I don't think), but I am completely stuck on this issue. You guys have already been a tremendous help in the past, so I figured it was worth a shot. I haven't changed a thing to the script itself after the update, however now I get the following error:
error: Type mismatch between variable "i_Color" matched by location "1"
The vertex shader has a variable 'out vec4 o_Data1' bound to location 1, while the fragment shader has a variable 'in vec4 i_Color' bound there as well. I'll post my shaders below, but as you'll see, they're quite straightforward. I'm using it for font rendering from a single texture, allowing the font to change color in the fragment shader. I'm not sure what could possibly be going wrong. I've got other programs with a similar structure, that still work after the update. Note that these scripts were code-generated. That's why I use layout location on all of my data, it made the scripts much easier to mix and match.
My vertex shader:
#version 450 core
layout(location = 0)
uniform mat4 u_Matrix;
layout(location = 0)
in vec4 i_Vertex;
layout(location = 3)
in mat4 i_Matrix;
layout(location = 2)
in vec4 i_Data1;
layout(location = 1)
out vec4 o_Data1;
layout(location = 1)
in vec2 i_Data0;
layout(location = 0)
out vec2 o_Data0;
void main()
{
o_Data1 = i_Data1;
o_Data0 = i_Data0;
gl_Position = u_Matrix * i_Matrix * vec4(i_Vertex.x + 0.0, i_Vertex.y - 0.0, i_Vertex.z, 1.0);
}
My fragment shader:
#version 450 core
layout(location = 1)
uniform sampler2D u_Texture;
layout(location = 1)
in vec4 i_Color;
layout(location = 0)
in vec2 i_Coord;
out vec4 o_Color;
void main()
{
o_Color = texelFetch(u_Texture, ivec2(i_Coord), 0);
if(o_Color.a > 0.0)
{
o_Color.rgb = i_Color.rgb * (1.0 - o_Color.rgb);
}
if(o_Color.a == 0.0)
{
discard;
}
}
Does anyone have an idea what could be going wrong here? Thanks in advance!