Skip to main content

cube_direction

Function cube_direction 

Source
fn cube_direction(face: u32, u: f32, v: f32) -> Vec3
Expand description

The direction a cube-map texel looks along.

The faces are in the order a cube map samples them — +X, -X, +Y, -Y, +Z, -Z — and the pair (u, v) runs across the face from its top-left.