

If you’ve used Metal to render 3D meshes composed of triangles, you may have encountered a situation where the mesh you wanted to draw was too large to fit into memory. The tessellated triangles then pass through the remainder of the graphics pipeline (vertex shader, rasterizer, etc.) on their way to the framebuffer. The number of triangles generated by a patch is controlled by configuring a fixed-function stage of the pipeline called the tessellator. A patch is a triangular or quadrilateral domain that can be subdivided by the GPU to produce triangles.

Conversely, when tessellating, our draw calls are denominated in patches. With ordinary draw calls, we render primitives such as triangles, lines, or points.

Tessellation is a form of geometry amplification: programmatically turning geometry into more geometry. Polyhedrons subdivided with Metal tessellation A Brief Introduction to Tessellation
#Tessellation drawing how to
It consists of a Mac app written in Swift that shows how to dynamically subdivide a cube and icosahedron, optionally smoothing the resulting shapes into approximate spheres. The source code for this article is available here. This article discusses the fundamentals of tessellation and how to do it in Metal future articles will showcase specific use cases. Tessellation is a powerful technique for generating geometry dynamically with many use cases from CAD/CAM to game development and beyond. In this article we will take a look at how to do tessellation on the GPU with Metal.
