Graphics Reference
In-Depth Information
Figure 3.31. The set of control points that will affect a single
quad of the surface.
tessellation algorithm design task into a few different
components. First, our control patches must define the
surface that we actually want. This is typically done at
the content creation phase if the object is pre-created
by an artist. Second, our tessellation factors must be
calculated from the control patch to ensure that our
desired surface is adequately sampled and therefore
it appears correct in the current viewing conditions,
while minimizing the number of vertices required to
achieve that visual quality. Finally, when provided
with a set of coordinates, our algorithm must be able
to properly sample the virtual surface from the control patch data. These steps are shown
in a block diagram in Figure 3.30.
Figure 3.30. The process of construct-
ing geometry from a virtual surface at
the specified sampling points.
Bezier Curves
With these steps in mind, we can consider a traditional tessellation algorithm and see how
it would fit into this whole tessellation paradigm. We will consider one of the most well-
known surface representations—the Bezier surface. The general concept of a Bezier sur-
face is that the desired surface is shaped by moving a grid of control points. The number of
points can vary, but for our example we will assume a 4x4 grid of control points to define
the surface shape for a quad portion of the surface. This setup is shown in Figure 3.31.
Once the surface has been edited into the desired shape, the control points are stored
as vertices in a vertex buffer, and an index buffer is used to define groups of control points
as control patches. Next, when the object is going to be rendered, the input assembler
builds the control points as vertices and passes them to the vertex shader. At the same time,
Search WWH ::




Custom Search