1#version 400 core 2 3uniform mat4 g_mWorldViewProjection; 4 5// GLSL tessellation evaluation shader (domain shader in HLSL). 6layout(triangles, equal_spacing, cw) in; 7void main() 8{ 9 // Baricentric interpolation 10 vec3 finalPos = vec3(gl_TessCoord.x * gl_in[0].gl_Position + 11 gl_TessCoord.y * gl_in[1].gl_Position + 12 gl_TessCoord.z * gl_in[2].gl_Position); 13 gl_Position = g_mWorldViewProjection * vec4(finalPos, 1.0); 14} 15