Skip to main content

octahedral_encode

Function octahedral_encode 

Source
pub fn octahedral_encode(n: [f32; 3]) -> [f32; 2]
Expand description

Octahedral normal encoding: packs a unit normal into 2 floats in [-1, 1]. This is more bandwidth-efficient than storing XYZ in RGBA16F.