I’ve just started learning OpenGL and need some help with passing through colours. When I had just a vertex and fragment shader, I could pass colours through simply. Then I added tessellation control and tessellation evaluation shaders, and am not sure how to pass them through. My ultimate goal is to apply lighting to a sphere, but right now I just need to get the colours working.
In my vertex shader, I have this declared:
layout (location=2) in vec3 colour;
out vec3 v_colour;
In my fragment shader:
in vec3 v_colour;
out vec4 colour;
How can I pass it from the vertex shader through tessellation control and evaluation to the fragment shader?
Thanks for any help.