I am trying to pass a vec3 array from vertex shader to tessellation shader.
passing just one value works fine, but how to pass an array?
Vertex shader
#version 430
out vec3 data; //working!
out vec3 dataArray[2];
void main()
{
gl_position = vec4(0,0,0,0);
data = vec3(1,2,3);
dataArray[0] = vec3(1,2,3);
dataArray[1] = vec3(4,5,6);
}
tessellation controll shader
#version 430
layout (vertices = 3) out;
in vec3 data[]; //working!
in vec3 dataArray[2][]; // how to do this?
void main()
{
...
}
The error message is: error C7618: OpenGL/ES does not allow input array declarations with size not equal to gl_MaxPatchVertices
I also tried
in vec3 dataArray[2][gl_MaxPatchVertices]
But this also doesn't work.