pub fn octahedral_encode(n: [f32; 3]) -> [f32; 2]
Octahedral normal encoding: packs a unit normal into 2 floats in [-1, 1]. This is more bandwidth-efficient than storing XYZ in RGBA16F.