Vertex Shader
Add the texture coordinate attribute input
in layout(location=0) vec3 aPos;
in layout(location=1) vec3 aNormal;
// added for LabA07
in layout(location=2) vec2 aTexCoord;Adding the texure coordinate output
out vec3 normal;
out vec3 fragPos;
// added for LabA07
out vec2 texCoord;void main()
{
...
// added for LabA07
texCoord = aTexCoord;
}Full Source Code of the Vertex Shader
Last updated