3 GL_ARB_tessellation_shader
6 [vertex shader passthrough]
9 [tessellation control shader]
10 #extension GL_ARB_tessellation_shader: require
11 layout(vertices = 3) out;
16 gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
17 gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 0.0);
18 gl_TessLevelInner = float[2](0.0, 0.0);
19 color[gl_InvocationID] = vec4(0, 1, 0, 1);
23 [tessellation evaluation shader]
24 #extension GL_ARB_tessellation_shader: require
31 gl_Position = gl_in[0].gl_Position * gl_TessCoord[0]
32 + gl_in[1].gl_Position * gl_TessCoord[1]
33 + gl_in[2].gl_Position * gl_TessCoord[2];
35 color_fs = color[0] * gl_TessCoord[0]
36 + color[1] * gl_TessCoord[1]
37 + color[2] * gl_TessCoord[2];
46 gl_FragColor = color_fs;
59 clear color 0.1 0.1 0.1 0.1
61 patch parameter vertices 3
62 draw arrays GL_PATCHES 0 6
63 probe all rgba 0.0 1.0 0.0 1.0