#version 150 core #extension GL_ARB_tessellation_shader: require layout(quads, equal_spacing, ccw) in; in block { vec3 pos; vec3 color; } In[]; out block { vec3 pos; vec3 color; } Out; void main() { vec3 tessellated_pos = mix( mix(In[0].pos, In[1].pos, gl_TessCoord.x), mix(In[3].pos, In[2].pos, gl_TessCoord.x), gl_TessCoord.y); vec3 v_Color = mix( mix(In[0].color, In[1].color, gl_TessCoord.x), mix(In[3].color, In[2].color, gl_TessCoord.x), gl_TessCoord.y); // just pass through to Geometry stage Out.pos = tessellated_pos; Out.color = v_Color; }