March 2013
Intermediate to advanced
984 pages
26h 18m
English
All of that theory could use a concrete demonstration. In this section, we’ll render the famous Utah teapot using Bézier patches. A Bézier patch, named after French engineer Pierre Bézier, defines a parametric surface evaluated over the unit square using control points arranged in a grid. For our example, we’ll use 16 control points arranged in a 4 × 4 grid. As such, we make the following observations to help us set up our tessellation:
• Bézier patches are defined over the unit square, which indicates we should use the quads domain type that we’ll specify in our layout directive in the tessellation evaluation shader.
• Each patch has 16 control points, so our GL_PATCH_VERTICES should be set to 16 using glPatchParameteri() ...