![]() Only triangle domain - no quads, no isoline tessellation.Surface shaders can optionally compute phong tessellation to smooth model surface even without any displacement mapping.Ĭurrent limitations of tessellation support:.Here you’d typically to displacement mapping. When tessellation is used, “vertex modifier” ( vertex:FunctionName) is invoked after tessellation, for each generated vertex in the domain shader.That function computes triangle edge and inside tessellation factors. Tessellation is indicated by tessellate:FunctionName modifier.See How To: Create a Hull Shader.Surface Shaders have some support for DirectX 11 GPU Tessellation. MyOutPoint main(uint Id : SV_ControlPointID, As a result, the tessellator stage may or may not run, the domain shader will not run, and no visible output will be produced for that patch. If the hull shader sets any edge tessellation factor to ≤ 0 or NaN, the patch will be culled (omitted).Tessellation factors can be consumed by the Tessellator (TS) stage and the Domain Shader (DS) stage. Patch constant data can be consumed by a domain shader. The control-points output from a hull shader can be consumed by the domain-shader stage. The shader output is between 1 and 32 control points, regardless of the number of tessellation factors.Tessellation factors determine how much to subdivide each patch.īetween 1 and 32 output control points, which together make up a patch.This information appears as declarations typically at the front of the shader code. This includes information such as the number of control points, the type of patch face and the type of partitioning to use when tessellating. The hull shader declares the state required by the Tessellator (TS) stage.The patch-constant phase has read-only access to all input and output control points.īetween 1 and 32 input control points, which together define a low-order surface. Internally, many patch-constant phases may run at the same time. The patch-constant phase operates once per patch to generate edge tessellation factors and other per-patch constants.The control-point phase operates once for each control-point, reading the control points for a patch, and generating one output control point (identified by a ControlPointID).The HLSL compiler extracts the parallelism in a hull shader and encodes it into bytecode that drives the hardware. A hull shader is implemented with an HLSL function.Ī hull shader operates in two phases: a control-point phase and a patch-constant phase, which are run in parallel by the hardware. The Hull Shader (HS) stage is a programmable shader stage. The tessellation stages include the Hull Shader (HS) stage, Tessellator (TS) stage, and Domain Shader (DS) stage. The three tessellation stages work together to convert higher-order surfaces (which keep the model simple and efficient) to many triangles for detailed rendering within the graphics pipeline. It also does some per-patch calculations to provide data for the Tessellator (TS) stage and the Domain Shader (DS) stage. A hull shader is invoked once per patch, and it transforms input control points that define a low-order surface into control points that make up a patch. The Hull Shader (HS) stage produces a geometry patch (and patch constants) that correspond to each input patch (quad, triangle, or line). The Hull Shader (HS) stage is one of the tessellation stages, which efficiently break up a single surface of a model into many triangles.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |