Writing tessellation evaluation shaders
Tessellation evaluation is the second programmable stage in the tessellation process. It is executed when the geometry is already tessellated (subdivided) and is used to gather results of the tessellation to form the new vertices and further modify them. When the tessellation is enabled, we need to write tessellation evaluation shaders to acquire the locations of generated vertices and provide them to the consecutive pipeline stages.
How to do it...
- Create a text file. Select a name for the file and use a
tese
extension for it (for example,shader.tese
). - Insert
#version 450
in the first line of the file. - Using the
in
layout qualifier, define the type of formed primitives (isolines
,triangles,
orquads
), the spacing between formed vertices (equal_spacing
,fractional_even_spacing
orfractional_odd_spacing
), and a winding order of generated triangles (cw
to keep the winding provided in an application orccw
to reverse the winding provided in an application...