Expand description
Section 19 (IMPO): Directional Octahedral Impostor Atlas for .10d Living Containers.
Provides the runtime data container and projection mathematics for Tier 3 rendering (Screen-Space Radius: 8–64 px). At this distance, drawing full geometry or even dense meshlets triggers the GPU 2x2 quad-overdraw penalty. An octahedral impostor replaces the entire geometry with a single camera-facing quad (2 triangles) that samples an offline-baked atlas of directional views.
§Mathematical Foundations
-
Hemi-Octahedral Projection: Maps upper-hemisphere directional rays $V \in S^2$ ($z \ge 0$) onto a unit square UV coordinate $[0, 1]^2$: $$u = \frac{x}{2(|x| + |y| + z)} + 0.5, \quad v = \frac{y}{2(|x| + |y| + z)} + 0.5$$ This provides uniform solid-angle texel distribution with minimal distortion compared to equirectangular maps.
-
Barycentric View Interpolation: At runtime, a camera view vector falls between grid cells. The runtime determines the 3 closest discrete camera angle viewpoints on the octahedral grid and blends them with barycentric weights, providing parallax-free rotation without popping.
-
Packed Channels:
- Slice 0: Albedo RGB + Radial Depth A (for depth-buffer reconstruction and soft intersections).
- Slice 1: Octahedral normal map + Metallic/Roughness.
Structs§
- Impostor
Atlas Mini Header - 64-byte POD header encoding octahedral impostor atlas in SectionType::ImpostorAtlas (19).
- Impostor
Blend Sample - Viewpoint blending information for smooth camera interpolation.
Enums§
Constants§
- FLAG_
DEPTH_ IN_ ALPHA - FLAG_
HEMI_ OCTAHEDRAL - FLAG_
OCT32_ NORMALS - FLAG_
PBR_ METALLIC_ ROUGHNESS - IMPOSTOR_
MINI_ HEADER_ SIZE - IMPOSTOR_
SECTION_ VERSION - MAGIC_
IMPO
Functions§
- decode_
impostor_ section - Decode impostor header and extract zero-copy slice of atlas payload. Zero heap.
- encode_
impostor_ section - Encode impostor header and binary atlas payload into caller-supplied buffer. Zero heap.
- hemi_
octahedral_ decode - Unproject 2D octahedral UV coordinates $[0.0, 1.0]^2$ back to a normalized 3D directional vector on the upper hemisphere.
- hemi_
octahedral_ encode - Project a normalized 3D direction vector $V = (x, y, z)$ on the upper hemisphere ($z \ge 0$) onto 2D octahedral UV coordinates $[0.0, 1.0]^2$.
- sample_
impostor_ blend_ weights - Calculate the 3 closest discrete camera viewpoints on the octahedral grid and their barycentric blending weights.