Skip to main content

octahedral_encode_tangent

Function octahedral_encode_tangent 

Source
pub fn octahedral_encode_tangent(v: Vec3, sign: f32) -> Vec2
Expand description

Encode tangent vectors as octahedral coordinates with range [-1, 1]. The sign is encoded in y component. Use octahedral_decode_tangent to decode.