How it possible to pass data through shaders, when using vertex, tess. control, tess. evaluation, geometry and fragment shaders. I've tried using interface block this way.
//vertex shaders
out VS_OUT { ... } vs_out;
Than I wrote this code in tessellation control shader:
in VS_OUT { ... } tc_in;
out TC_OUT { ... } tc_out;
So, tesselation control shader called once for every vertex. Does it mean that tc_in must be not array but single variable. I'm not really sure about that because of sneaky gl_InvocationID.
Then things become tough. Tessellation evaluation shader. Something tells me that evaluation shader should take interface block as array.
in TC_OUT { ... } te_in[];
out TE_OUT { ... } te_out[];
Moving to geometry shader. Geometry shader takes multiple vertices, so, definitely array interface block.
in TE_OUT { ... } gs_in[];
out vec3 random_variable;
...
random_variable = gs_in[whatever_index];
Seems legit for me, but data didn't come to fragment shader.
I would appreciate any advice.