3 GL_ARB_tessellation_shader
13 color = vec4(0, 1, 0, 1);
17 [tessellation control shader]
18 #extension GL_ARB_tessellation_shader: require
19 layout(vertices = 3) out;
25 gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
26 gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 0.0);
27 gl_TessLevelInner = float[2](0.0, 0.0);
28 color_tes[gl_InvocationID] = color[gl_InvocationID];
32 [tessellation evaluation shader]
33 #extension GL_ARB_tessellation_shader: require
40 gl_Position = gl_in[0].gl_Position * gl_TessCoord[0]
41 + gl_in[1].gl_Position * gl_TessCoord[1]
42 + gl_in[2].gl_Position * gl_TessCoord[2];
44 color_fs = color_tes[0] * gl_TessCoord[0]
45 + color_tes[1] * gl_TessCoord[1]
46 + color_tes[2] * gl_TessCoord[2];
55 gl_FragColor = color_fs;
68 clear color 0.1 0.1 0.1 0.1
70 patch parameter vertices 3
71 draw arrays GL_PATCHES 0 6
72 probe all rgba 0.0 1.0 0.0 1.0