<aside> 📝 Requires Shader Model 5.0.
</aside>
When using tesselation, both the Hull Shader and Domain Shader must be set.
The vertex shader passes the control points to the hull shader.
VertexOutput Output;
Output.Position = Input.Position;
return Output;
The hull shader signature requires an InputPatch parameter.
The output structure and output patch size are specified as template arguments in InputPatch.
Attributes:
domain — Input topology set to quad.outputtopology — Output topology set to triangle_cw.partitioning — Partitioning mode. Specified as a preprocessor definition.outputcontrolpoints — Output patch size is specified.patchconstantfunc — Function to process patches.<aside>
💡 The input patch size must match the call to IASetPrimitiveTopology.
</aside>
The hull shader passes the control points to the domain shader.
HullOutput Output;
Output.Position = Patch[index].Position;
return Output;
The domain shader calculates the final SV_Position for each vertex, that is passed to the rasterizer.