Skip to main content

Module surfel_section

Module surfel_section 

Source
Expand description

Section 20 (SURF1): Hierarchical Surfel / 3D Gaussian Splat Primitives for .10d Living Containers.

Provides the runtime data container and offline meshlet-to-surfel fitting mathematics for Tier 4 far-field rendering (Screen-Space Radius: 1–8 px). At this distance, drawing full geometry, LODs, or even impostor billboards causes overdraw and cache thrashing. A hierarchical surfel condenses an entire 64-triangle meshlet cluster into a single 32-byte oriented disc / splat primitive evaluated in a single GPU compute rasterization pass.

§32-Byte POD Binary Layout (SurfelBinaryRecord)

OffsetTypeFieldDescription
0x00[f32; 3]positionWorld or local space centroid (12 bytes)
0x0Cu32normal_oct32Octahedral encoded orientation (4 bytes)
0x10[u16; 2]radiiMajor and minor splat radii in IEEE 754 f16 (4 bytes)
0x14[u16; 3]spectral_coeffsJakob-Hanika $(c_0, c_1, c_2)$ in f16 (6 bytes)
0x1Au16roughnessAggregate perceptual roughness in f16 (2 bytes)
0x1Cu32flagsMaterial bitmask / hierarchy indices (4 bytes)

Structs§

SurfelBinaryRecord
32-byte POD binary record for a single Tier 4 Surfel / 3D Gaussian Splat.
SurfelSectionMiniHeader
64-byte POD header encoding hierarchical surfel table in SectionType::HierarchicalSurfels (20).

Enums§

SurfelSectionError

Constants§

FLAG_SURFEL_GAUSSIAN_COVARIANCE
FLAG_SURFEL_HIERARCHICAL
MAGIC_SURF
SURFEL_MINI_HEADER_SIZE
SURFEL_RECORD_SIZE
SURFEL_SECTION_VERSION

Functions§

decode_octahedral_normal
Decode a 32-bit octahedral normal back into a normalized 3D vector.
decode_surfel_section
Zero-copy parser for a surfel section. Returns a borrowed reference to header and records.
encode_octahedral_normal
Encode a 3D unit normal vector into a 32-bit octahedral representation (two i16s packed into u32).
encode_surfel_section
Encode a surfel section into a caller-supplied byte buffer. Zero-heap.
generate_surfel_from_cluster
Deterministic 1:1 generator mapping a meshlet triangle cluster into a 32-byte Tier 4 Surfel.