5/28/2023 0 Comments Tessellation shaderNormally, the kind of Primitive emitted by the primitive generator is defined by the abstract patch type. Since lines don't have a winding order, this parameter is useless when using the isolines patch type or point_mode rendering. If the TES does not specify this parameter, ccw will be used. As such, different triangles generated from the same patch can have different final winding orders. The winding order of the final triangle primitives will ultimately be based on the TES's generated positions. Remember that this parameter only controls the winding order of the triangles within the abstract patch. This is done via the cw and ccw parameters. To facilitate that, the TES has the ability to control the winding order of the primitive generator. Therefore, maintaining the proper winding order for triangles is the job of the TES. It is the TES's responsibility to take abstract patch coordinates and generate real clip-space (or whatever your Geometry Shader expects) positions from them. The process of tessellation takes place over an abstract patch, which is not in any particular coordinate system. When emitting triangles, the Winding Order can be important for face culling. If the TES does not specify this parameter, equal_spacing will be used. fractional_odd_spacing: As even-spacing, but there will always be an odd number of segments.Two of the segments will grow and shrink based on how close the tessellation level is to generating more vertices. fractional_even_spacing: There will always be an even number of segments.equal_spacing: There will be equal distances between vertices in the abstract patch.The TES has options that control the spacing between tessellated vertices of the abstract patch. isolines: The patch is a rectangular block of parallel lines.The TES defines the type of abstract patch that will be tessellated. However, each particular type of parameter can only be specified once (you technically can specify them multiple times, but they all must be the same). They can be specified as separate statements or all in one. This section will only describe how to specify these options, not go into detail on exactly what they do.Īll of these options are input layout qualifiers. The details of what these mean for the tessellation results are described in the section on the tessellation primitive generation. Because of that, many options that control the particular form of tessellation are specified in the TES itself. The presence of an active TES in a program or program pipeline is what governs whether or not the tessellation primitive generation stage will occur. However, like the Vertex Shader, the TES is expected to output the same value for the same vertex in the abstract patch. It will be invoked at least once per tessellated vertex in the abstract patch, but there is no guarantee that the TES won't be invoked multiple times for the same vertex. The number of times the TES is invoked can differ from implementation to implementation. It can also take per-patch data provided by the Tessellation Control Shader. Each TES invocation generates a single vertex. The (TES) takes the abstract patch generated by the tessellation primitive generation stage, as well as the actual vertex data for the entire patch, and generates a particular vertex from it. These values are passed on to the next stage in the pipeline. The Tessellation Evaluation Shader (TES) is a Shader program written in GLSL that takes the results of a Tessellation operation and computes the interpolated positions and other per-vertex data from them.
0 Comments
Leave a Reply. |