Why can't I set vertTextCoord as fragColor?

Cannot link the shader program...

#version 410

uniform mat4 transform;

in vec4 vertex;
in vec4 color;
in vec4 texCoord;

out vec4 vertColor; 
out vec4 vertTexCoord;


void main() {
    gl_Position = transform * vertex;
    vertColor = color;
    vertTexCoord = texCoord;
}

the frag:

#version 410

uniform sampler2D texture;

in vec4 vertTextCoord;

uniform vec2 texOffset;

out vec4 fragColor;


void main() {
    fragColor = vertTextCoord;
}

I know the shader doesn't make much sense. It is just the start of something :) It only makes no sense to me why this doesn't work.

Answers

  • Nevermind, I had vertTextCoord... text... It's a bit early, my eyes are not yet fully open :)

  • Haha :D Yeah, these 4-o'clock-in-the-morning-typos...

Sign In or Register to comment.