Integrating tessellation into the graphics pipeline
Let’s switch gears and learn how to integrate hardware tessellation into our Vulkan graphics rendering pipeline. Hardware tessellation consists of two new shader stages in the graphics pipeline. The first stage is called the tessellation control shader (TCS), and the second is the tessellation evaluation shader (TES). The tessellation control shader works with a set of vertices, known as control points, which define a geometric surface referred to as a patch. This shader can modify the control points and determine the level of tessellation required. The tessellation evaluation shader then uses the barycentric coordinates of the tessellated triangles to interpolate per-vertex attributes like texture coordinates and colors. Let’s dive into the code to see how these stages can be used to dynamically triangulate a mesh based on the camera’s distance.
While tessellation shaders are a powerful tool for hardware...