Function meshopt::clusterize::build_meshlets[][src]

pub fn build_meshlets(
    indices: &[u32],
    vertex_count: usize,
    max_vertices: usize,
    max_triangles: usize
) -> Vec<Meshlet>

Splits the mesh into a set of meshlets where each meshlet has a micro index buffer indexing into meshlet vertices that refer to the original vertex buffer.

The resulting data can be used to render meshes using NVidia programmable mesh shading pipeline, or in other cluster-based renderers.

For maximum efficiency the index buffer being converted has to be optimized for vertex cache first.

Note: max_vertices must be <= 64 and max_triangles must be <= 126