Skip to main content

compress_positions

Function compress_positions 

Source
pub fn compress_positions<'a>(
    positions: &'a [[f32; 3]],
    out_meta: &mut MeshMetadata,
) -> impl Iterator<Item = CompressedPosition> + 'a
Expand description

Compress positions into Snorm16x4 relative to their bounding box, writing the decode parameters into out_meta.

The returned iterator is lazy: nothing is allocated, and a caller can stream the values straight into a GPU buffer.

ยงPanics

If positions is empty.