![]() ![]() Its purpose is to establish the tessellation levels for the Tessellation Primitive Generator (TPG) and transmit the control points to the subsequent programmable stage (the TES), along with any additional per-patch data if required. The tessellation control shader (TCS) is the first stage of the pipeline that recognizes a set of control points describing a patch as an input primitive. The remainder of this tutorial will provide more detailed information, providing a comprehensive understanding of tessellation in computer graphics. Once confirmed that our GPU supports it, enabling tessellation simply involves including the corresponding pre-compiled code in a pipeline object during its creation. ![]() At that point, we can create a logical device while informing the driver of our intention to use this optional stages of the pipeline. This means that, to use them, we must first verify that our physical device supports tessellation. The tessellation stages are optional in the graphics pipeline. Following this, the Tessellation Evaluation Shader (TES) uses the output control points from the TCS and the samples generated by the TPG to emit the vertices of the tessellated output patch. Then, a fixed-stage called Tessellation Primitive Generator (TPG, or simply tessellator) tessellates\subdivides the patch domain and generate sample points based on some tessellation settings determined by the TCS. In short, the Tessellation Control Shader (TCS) receives the control points (and their associated attributes) from the vertex shader and produces some control points describing an output patch (i.e., it can modify the input patch and pass the result to the next programmable stage). Then, the tessellation operations can be performed through two programmable stages and a fixed one. The vertex shader processes the control points describing an input patch as they were normal vertices stored in a vertex buffer containing the corresponding vertex attributes. The general concept is illustrated in the image below. Therefore, at some point, we need to tessellate the patch so it can be represented as a collection of primitives (a mesh). However, it’s important to remember that the graphics pipeline still operates with primitives such as triangles, lines, and points. Instead, by using a connected collection of patches, we can represent the same object using only a few control points to be processed\transformed by the initial stages of the pipeline. This method can be particularly useful when representing detailed mesh objects that would otherwise require a ton of vertices to be stored in a vertex buffer. Appendix 06 ( Bézier curves and surfaces) explains how a surface can be expressed as a weighted sum of control points. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |