pub fn octahedral_map(dir: Vec3) -> Vec2
Encode a unit direction using the octahedral map (Cigolle et al., 2014).
Returns a value in [-1, 1]².
[-1, 1]²