3 GL_ARB_tessellation_shader
5 [vertex shader passthrough]
6 [tessellation evaluation shader]
7 #extension GL_ARB_tessellation_shader : require
14 if (gl_PrimitiveID == 0) {
15 tpos[0] = vec2(-1, -1);
16 tpos[1] = vec2( 1, -1);
17 tpos[2] = vec2(-1, 1);
19 tpos[0] = vec2(-1, 1);
20 tpos[1] = vec2( 1, -1);
21 tpos[2] = vec2( 1, 1);
23 pos = tpos[0] * gl_TessCoord[0] +
24 tpos[1] * gl_TessCoord[1] +
25 tpos[2] * gl_TessCoord[2];
30 layout(triangle_strip, max_vertices = 3) out;
34 gl_Position = vec4(pos[0], 0, 1);
36 gl_Position = vec4(pos[1], 0, 1);
38 gl_Position = vec4(pos[2], 0, 1);
46 gl_FragColor = vec4(0, 1, 0, 0);
60 patch parameter default level outer 16 16 16 16
61 patch parameter default level inner 16 16
63 clear color 0.5 0.5 0.5 1.0
65 patch parameter vertices 3
66 draw arrays GL_PATCHES 0 6
67 probe all rgba 0 1 0 0