
6. An Introduction to Tessellation Shaders 97
layout ( quads , fractional_even_spacing, cw) out;
// Declare inputs from tess control shader
in float tcFoo [];
// Declare per-patch inputs
patch in float tcSharedFoo;
// Declare per-vertex outputs
out float teFoo;
void main ()
{
vec3 tc = gl_TessCoord;
teFoo = ... ;
gl_Position = ... ;
}
Listing 6.2. Tessellation evaluation shader template.
Listing 6.2 presents a template for a tessellation evaluation shader. Unlike the
control shader, the outputs are not arrayed over the patch.
For a visualization of gl
TessCoord in quads mode, see Figure 6.6. The mean-
ing of gl
TessCoord varies according to the tessellation mode. ...