Graphics Reference
In-Depth Information
The previous domain shader code renders a torus, as shown in the following screenshot:
Render of a torus using a parametric surface domain shader (wireframe on the left and solid on the right)
It is also possible to implement the parametric surfaces directly within the vertex shader
with no vertex buffers, and with the use of the SV_VertexId input semantic to index into a
shader resource or as input into some function. This may result in an even faster generation
of the parametric geometry as compared to the tessellation pipeline, although it would also
require additional logic to be implemented either on CPU or within further shader functions.
See also
Bezier surface patches for the famous Utah Teapot can be found at:
http://www.holmes3d.net/graphics/teapot/ . These can be loaded directly
into a vertex buffer for use with this recipe. Remember that every four vertices represent
a Bezier curve, and there are four curves to a patch giving 16 control points per patch.
Refining meshes with Phong tessellation
In this recipe, we will implement a simple technique for the local refinement of triangle
meshes through tessellation—Phong tessellation. This technique, put forward by Boubekeur
and Alexa in 2008, follows the same principles as Phong shading (thus the name) and
normal mapping, but instead of improving the perceived visual smoothness of flat surfaces,
it improves the actual smoothness of contours and silhouettes.
Phong tessellation is computationally inexpensive when compared to algorithms for
approximating Catmull-Clark subdivision surfaces. It still achieves smooth silhouettes
and more importantly, it can be locally implemented on the tessellation hardware without
requiring any additional precalculated weights/control points or specially prepared meshes
unlike bicubic Bezier patches or Gregory patches.
This means that most existing triangulated meshes will work reasonably well with Phong
tessellation with few or no changes to the original mesh.
 
Search WWH ::




Custom Search