3 GL_ARB_tessellation_shader
15 [tessellation control shader]
16 #extension GL_ARB_tessellation_shader: require
17 layout(vertices = 3) out;
20 gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
21 gl_TessLevelOuter = float[4](3.0, 2.0, 4.0, 5.0);
22 gl_TessLevelInner = float[2](6.0, 7.0);
26 [tessellation evaluation shader]
27 #extension GL_ARB_tessellation_shader: require
33 gl_Position = gl_in[0].gl_Position * gl_TessCoord[0]
34 + gl_in[1].gl_Position * gl_TessCoord[1]
35 + gl_in[2].gl_Position * gl_TessCoord[2];
36 color = gl_TessLevelOuter[0] == 3.0 &&
37 gl_TessLevelOuter[1] == 2.0 &&
38 gl_TessLevelOuter[2] == 4.0 &&
39 gl_TessLevelInner[0] == 6.0 ?
40 vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
62 clear color 0.1 0.1 0.1 0.1
64 patch parameter vertices 3
65 draw arrays GL_PATCHES 0 6
66 probe all rgba 0.0 1.0 0.0 1.0