Friday, April 29, 2011

DirectX 11 Tessellation Notes

Good tutorial and introduction to programming the DirectX11 tessellator

http://www.geeks3d.com/20101126/direct3d-11-tessellation-tutorial/



Hull Shader Stage

This stage is divided into two parts, ConstantHS and MainHS.

ConstantHS is invoked once per primitive and it's function is to output the Tessellation Factor.

MainHS is invoked per control point and it's purpose is to calculate any basis change on the primitive.





Tessellator Unit

Tessellator outputs up to 8192 triangles per input patch. The exact triangle amount is passed as a parameter.

This stage creates new triangles that compose a regular grid with texture coordinates ranging from 0 to 1.

Tessellation can be achieved in 3 different ways: integer, even-fractional, odd-fractional. Integer is a straightforward symmetric subdivision. The fractional versions subdivide the edges and interpolate between different lod levels for a smoother transition.




Domain Shader Stage

The domain shader is invoked once per vertex output from the tessellator and it's role is to compute the parametric position based on the control points from the hull shader. This is also where displacement maps would be applied.

No comments:

Post a Comment