Expand description
GPU-free builders for the ray-tracing geometry table plus the dynamic-update
mode ladder, shared by the backends that hardware-ray-trace reflections. Each
backend fills its own RtGeomEntry table from the participating draw set;
the per-entry packing (index slice, resolved shared-pool texture indices,
material, model matrix) is identical across backends and lives here. The
per-backend TLAS instance transform (MTLPackedFloat4x3 / VkTransformMatrixKHR
/ DXR [f32; 12]) is a real hardware type and stays in each backend.
Enums§
- RtDynamic
Mode - How the scene acceleration structure is kept current when props move.
Selected once at init from the launch’s
--rt-dynamicrequest;Autois the shipping behaviour and what an unset request resolves to.
Functions§
- cluster_
geom_ entry - Build the geometry-table entry for one instance of an instanced cluster: the cluster’s shared mesh slice + material, with this instance’s transform. Cluster geometry uses base_vertex 0 (its indices are already absolute).
- geom_
entry - Build the geometry-table entry for one static draw object.
- models_
dirty - True when any participating object’s current model matrix differs from the one baked into the live TLAS. Pure (no GPU) so the dirty gate is unit-testable.
- skinned_
geom_ entry - Build the geometry-table entry for one skinned object. The skinned BLAS is
baked from the posed (model-space) deformed buffer with absolute u16 indices,
so
base_vertexis 0 and the model matrix brings the hit to world space. The skinned flag is OR’d intonormal_indexso the trace fetches from the deformed / u16 buffers. Albedo / normal resolve through the shared pool by the object’stexture_slot/normal_map_slot, so skinned hits shade textured like static ones (the flag bit lives above any valid pool index). - skinned_
index_ buffer_ bytes - Bytes to allocate for the shared u32 skinned index buffer holding
index_countindices. One index per word, so the only rounding left is the floor: no backend accepts a zero-length buffer.