Skip to main content
A meshlet is simply a sub-chunk of a mesh - a fixed number of primitives and vertices. A mesh can completely be defined by a set of meshlets, and each consists of unique set of primitives from the mesh. We’ll call a mesh that has been converted to a meshlet structure as being meshletized. The fixed number of primitives and vertices used to build the meshletized mesh is consistent across the list of meshlets and defines the maximum size of each meshlet. Ideally, each meshlet is as close to this size as possible but doesn’t necessarily fill it. The traditional index buffer is replaced by three new data structures: a meshlet list, a unique vertex index list, and a primitive list. Figure 1. Render of a meshletized mesh that’s colored by meshlet (a dragon). Note that the meshlets consist of primitives with reasonable spatial coherence. The following code example is a C++ implementation of a runtime meshlet structure. This data fully describes a renderable mesh.
This meshlet structure has several benefits for Mesh Shader rendering. Each meshlet has a fixed maximum size, which is ideal for mapping a fixed-sized threadgroup to single meshlet and provides an intuitive mapping of thread to vertex/primitive. The vertex and primitive counts are known up front, which eliminates the need to compute them in shader code. Vertex indices are already de-duplicated, which eliminates redundant vertex transformations and exports. Primitive indices are localized to the meshlet’s vertex list. Meshlets also provide an additional granularity for culling with spatial and orientational information. The previous code example shows the inter-relationship between the new meshlet buffers. The meshlet list is a flat list of the runtime “meshlet” structure, which is at minimum an offset and count into the unique vertex index and primitive lists. The unique vertex index list is a de-duplicated list of indices into the vertex data buffer. The primitive list defines the mesh’s primitives and consists of indices into the unique vertex index list, localized to the meshlet’s vertex offset. Figure 2. Diagram exhibiting the relationship between meshlet buffers.

Converting to meshlets

Meshletizing a traditional index buffer mesh requires no change to the artist workflow - it’s a procedural post-processing step after authoring the model. The traditional index buffer can also be quickly regenerated at runtime, removing the need to ship both traditional index buffers and meshlet buffers. Meshletization can be computationally non-trivial, so we recommend that you preprocess it offline. An example meshlet converter project, both a C++ library and a command-line tool, is provided by ATG to perform this conversion along with our other samples on the XBOX Developer Downloads page. This tool doesn’t modify the vertex data itself, so we recommend that you run a vertex cache optimizer such as the Forsyth algorithm over the mesh data before meshletizing. Optimizers tend to create more spatially coherent meshes than can be universally expected from content creation tools. Additional heuristics could be added to balance vertex re-use with beneficial culling properties of the resultant mesh structure.

Rendering with meshlets

The structure of the meshlet makes rendering very easy with Mesh Shaders. Declare the threadgroup size as the maximum meshlet size and dispatch one threadgroup for each meshlet in the mesh. Each thread is responsible for processing and exporting one vertex and primitive. The following shows a simple Mesh Shader code sample, which renders a meshletized mesh. First, the threadgroup’s meshlet is loaded and output counts can be immediately declared. Finally, PrimitiveCount threads are responsible for loading and writing primitive index data, and VertexCount threads load the vertex index that’s used to access the vertex data, and shades and writes it to the output array. The full sample can be found on the XBOX Developer Downloads page. The following code example is a sample implementation of a meshlet that’s rendering a Mesh Shader.

See also

Mesh Shader pipeline overview Mesh Shader API overview Mesh Shader usage Meshlet culling
Last modified on August 20, 2026