Skip to main content

pack_u16_pair

Function pack_u16_pair 

Source
pub fn pack_u16_pair(hi: u16, lo: u16) -> f32
Expand description

Pack two u16 values into the bit pattern of a f32.

The WGSL shader unpacks with bitcast<u32>(v) >> 16u and & 0xffffu. Values must be in [0, 65535].