Skip to main content

derive_position_bounds

Function derive_position_bounds 

Source
fn derive_position_bounds(positions: &[[f32; 3]], out_meta: &mut MeshMetadata)
Expand description

Derive the position decode parameters from positions and write them into out_meta.

The parameters are the bounding box the compression needs: positions encode to [-1, 1] relative to it, which is what mesh_compression.wesl reverses.

ยงPanics

If positions is empty.