Expand description
Section 23 (CDAG): Nanite-Style Hierarchical Meshlet Cluster DAG Section.
Encodes a continuous level-of-detail (CLOD) directed acyclic graph of 64-byte
cache-line-aligned meshlet clusters (MeshletClusterNode) preceded by a 32-byte
header (ClusterDagMiniHeader).
Each cluster stores its own bounding sphere and quadric error (lod_error_self)
alongside its parent group’s bounding sphere and error (lod_error_parent),
satisfying the monotonic DAG cut invariant lod_error_parent >= lod_error_self.
At runtime, GPU compute or CPU zero-heap traversal selects the cut where:
projected_error(self) <= threshold_px < projected_error(parent).
Structs§
- Cluster
DagMini Header - 32-byte POD mini-header for
SectionType::ClusterDag(CDAG). - Meshlet
Cluster Node - 64-byte cache-line-aligned POD node representing one meshlet in the Cluster DAG.
Enums§
- Cluster
DagSection Error - Errors emitted by the
CDAGsection codec and zero-heap LOD cut selector.
Constants§
- CLUSTER_
DAG_ HEADER_ SIZE - Fixed byte size of
ClusterDagMiniHeader. - CLUSTER_
DAG_ SECTION_ VERSION - Current format version of the
CDAGsection. - FLAG_
CDAG_ CONE_ CULLED - Normal cone axis and cutoff are populated for backface cluster culling.
- FLAG_
CDAG_ SEAM_ LOCKED - Cluster border vertices were seam-locked during hierarchical QEM simplification.
- MAGIC_
CDAG - 4-byte ASCII magic for
.10dCluster DAG sections ("CDAG"). - MAX_
CLUSTER_ DAG_ NODES - Maximum cluster nodes admitted in a single
CDAGsection. - MAX_
MESHLET_ TRIANGLES - Maximum triangles allowed in a single hardware meshlet cluster.
- MAX_
MESHLET_ VERTICES - Maximum vertices allowed in a single hardware meshlet cluster.
- MESHLET_
CLUSTER_ NODE_ SIZE - Fixed byte size of
MeshletClusterNode.
Functions§
- cluster_
dag_ encoded_ len - Compute exact byte length for a
CDAGsection withcluster_countnodes. - decode_
cluster_ dag_ section - Decode and validate a
CDAGsection into caller-providedMeshletClusterNodestorage (Zero-Heap). - decode_
oct16_ normal - Decode
[i16; 2]octahedralsnorm16coordinates back into a unit 3D vector. - encode_
cluster_ dag_ section - Encode a
CDAGsection into a caller-provided byte slice without heap allocation. - encode_
oct16_ normal - Encode a unit 3D direction into
[i16; 2]octahedralsnorm16coordinates. - project_
sphere_ error_ px - Project a world-space geometric error
world_erroratsphereinto screen-space pixels. - select_
cut_ clusters_ zero_ heap - Select the active continuous-LOD cut into
out_cluster_indiceswithout heap allocation.