---
title: A Deep Dive into Nanite Virtualized Geometry (Brian Karis et al., Epic Games, SIGGRAPH 2021 Advances in Real-Time Rendering)
source: https://advances.realtimerendering.com/s2021/Karis_Nanite_SIGGRAPH_Advances_2021_final.pdf
version: SIGGRAPH 2021 course slides + speaker notes (UE5 Early Access era; implementation may have changed by 5.8)
fetched: 2026-10-11
note: 原文摘录（英文要点），供 wiki 引用；非全文
---

# A Deep Dive into Nanite Virtualized Geometry (Brian Karis et al., Epic Games, SIGGRAPH 2021 Advances in Real-Time Rendering)

- Culling: occlusion cull against Hierarchical Z-Buffer (HZB). Two pass occlusion culling: test previous frame's HZB with previous transforms, draw visible, build HZB from that, then test what is visible now but wasn't (disoccluded) and draw those.
- Problems with conventional approach: switching shaders during rasterization, overdraw of material evaluation or depth prepass, pixel quad inefficiencies from dense meshes.
- Visibility Buffer: "Write geometry data to screen: Depth : InstanceID : TriangleID". Material shader per pixel: load VisBuffer, instance transform, 3 vertex indexes, 3 positions, transform to screen, derive barycentrics, load and lerp attributes. "No overdraw or pixel quad inefficiencies"; "Material pass writes GBuffer"; "rasterize triangles once per view". Terminology: uses "Visibility Buffer" for Object ID + Triangle ID form; other forms called deferred texturing.
- Clusters of 128 triangles; groups of clusters simplified and split forming a DAG ("Merge and split makes this a DAG instead of a tree"); error calculated using Quadric Error Metric (QEM), projected on screen to number of pixels of error. LOD selection corresponds to cutting the DAG; parallel selection by comparing cluster error and parent error so DAG traversal isn't needed at run time.
- Rasterization: tiny triangles are terrible for typical (HW) rasterizers, parallel over pixels not triangles. Software rasterizer "3x faster than hardware on average compared to our fastest primitive shader implementation". Uses 64b atomics: global image InterlockedMax to visibility buffer; depth in high bits gives depth test, payload (visible cluster index + triangle index) in low bits, payload must fit in 34 bits or less. "Clusters with edges <32 pixels are SW rasterized"; larger use HW rasterizer which "doesn't bind any color or depth targets and atomic writes to the UAV exactly the same as SW raster".
