Expand description
Caller-buffered CPU frustum visibility lists with stable source-index indirection. Canonical packed instance ABI and deterministic visibility delegation.
Structs§
- Bounded
Instance - Cull
Uniforms Gpu - Uniform buffer layout for
instance_cull_indirect.wgsl(288 bytes). - Draw
Indexed Indirect Command - WebGPU-standard 20-byte
DrawIndexedIndirectcommand payload. - Frustum
Plane - Normalized Gribb-Hartmann frustum plane $\mathbf{n} \cdot \mathbf{x} + d \ge 0$.
- GpuInstance
Record - Stable upload record for mesh instances shared by native and WASM WebGPU paths.
- HzbPyramid
View - Lightweight zero-heap view over a 2-phase Hierarchical Z-Buffer (HZB) mip chain.
- Indirect
Cull Pipeline Gpu - GPU-resident compute pipeline and indirect stream buffers for
INSTANCE_CULL_INDIRECT_WGSL. - Indirect
Cull Stream Counts - Output stream counts produced by
cull_and_select_lod_indirect_zero_heap. - Instance
Cull Descriptor - GPU-aligned per-instance culling & multi-modal routing descriptor (80 bytes,
5 x vec4).
Enums§
- Representation
Policy - Multi-modal representation policy encoded in
InstanceCullDescriptor::rep_policy. - Visibility
List Error
Constants§
- DEFAULT_
LOD_ HYSTERESIS - Default fractional hysteresis deadband around LOD thresholds (
10%). - DEFAULT_
LOD_ THRESHOLDS_ PX - Default screen-space projected radius thresholds in pixels (
[LOD0, LOD1, LOD2]). - DEFAULT_
MIN_ CULL_ RADIUS_ PX - Default minimum projected radius in pixels below which an instance is sub-pixel culled.
- GPU_
INSTANCE_ RECORD_ ABI_ VERSION - Version of the packed native/WASM instance record ABI.
- MAX_
GPU_ MESH_ INSTANCES
Functions§
- build_
hzb_ mip_ chain_ zero_ heap - Returns
(total_texels_written, mip_slices, mip_count). - compact_
visible_ packed_ records - Byte-oriented, alignment-independent form of
compact_visible_recordsfor WASM hosts. Output capacity and every source index are checked before the first byte is written. - compact_
visible_ records - Copy records in visible-index order into caller-owned upload scratch.
- cull_
and_ select_ lod_ indirect_ zero_ heap - Zero-heap CPU/GPU parity execution of 6-plane frustum culling, 2-phase HZB depth-pyramid occlusion culling, 4-tier hybrid LOD selection with hysteresis, and multi-modal stream routing.
- extract_
frustum_ planes - Extracts 6 normalized inward-pointing frustum planes from a column-major view-projection matrix.
- select_
lod_ tier_ with_ hysteresis - Selects the 4-tier LOD index (
0..=3) from an epistemic-weighted screen-space projected radius in pixels, applying a fractional hysteresis deadband around threshold transitions. - select_
visible_ instances - Append the visible source indices in stable input order.
- select_
visible_ instances_ packed - WASM-friendly SoA variant of
select_visible_instances. Bounds contain three floats per instance, transforms contain 16 column-major floats per instance, and view-projection contains 16 column-major floats. It performs no allocation and writes stable source indices. - select_
visible_ mesh_ instances - Select visible copies of one retained mesh after applying each per-instance transform and the renderer’s shared actor/model transform. The result contains stable source indices so the caller can compact records without losing semantic identity. Invalid numeric inputs fail open.