Skip to main content

octahedral_map

Function octahedral_map 

Source
pub fn octahedral_map(dir: Vec3) -> Vec2
Expand description

Encode a unit direction using the octahedral map (Cigolle et al., 2014).

Returns a value in [-1, 1]².