Meshlet Rendering - C++ / GLSL

A Vulkan renderer implementing Nanite style virtualized geometry using mesh shaders and hierarchical LODs.

Project Repository

About Project:

An implementation of the techniques described in Nanite at Home — building a Nanite-inspired GPU-driven renderer from scratch in C++ and GLSL, using VK_EXT_mesh_shader.

10,000 instances, each with full per-meshlet LOD selection running entirely on the GPU.

Features


  • Mesh shader pipeline — task shader + mesh shader via VK_EXT_mesh_shader; each mesh shader workgroup processes one meshlet
  • Meshlet generation — clusters of up to 64 vertices / 126 triangles built with meshoptimizer
  • Hierarchical LOD DAG — groups of meshlets are iteratively simplified and re-split; the DAG is built via clodBuild from meshoptimizer
  • Instance level frustum culling — bounding sphere tested against the view frustum before dispatching any meshlets for an instance
  • Meshlet level frustum culling — per-meshlet bounding sphere tested in the task shader
  • Backface cone culling — meshlets with a normal cone facing away from the camera are rejected in the task shader

References


Demo:

Screenshots:

Meshlet Rendering LOD visualization screenshot
Meshlet Rendering demo animation
Meshlet Rendering triangle visualization screenshot