← projects

graphics · sub-star

colossus

virtualized geometry from scratch in c++20 and vulkan, the idea behind nanite: 15.9 billion triangles in 1.51 ms.



readme

Virtualized geometry from scratch, the idea behind Unreal Engine 5’s Nanite, built with nothing but Vulkan and GLFW. A builder turns a scanned model into a crack-free hierarchy of clusters; a renderer streams it from disk and draws thousands of copies, picking per cluster the coarsest detail within a pixel of the original. 900 statues of Lucy and the XYZ RGB dragon are 15.9 billion triangles at full detail, drawn at 1920x1080 in 1.51 ms on an RX 9070 XT with soft shadows, bounce light, ambient occlusion and antialiasing. It takes real content too: a textured museum scan, skinned and animated characters, and a photoscanned pine forest of 753 million triangles. There is a one minute video on the repository. Clustering, simplification, streaming, culling, both rasterizers, shadows and shading all live in the repository, and the whole renderer is ported to WebGPU.

artifact

 

not simulated: the repo’s lod rule in 2d. each ring picks the coarsest level whose error is within a pixel on screen, and nearer means finer.

signal log

built with

C++20VulkanGLSLWebGPUWGSL

open the live demo →
view repository →