Skip to main content

chunk_dirs

Function chunk_dirs 

Source
pub fn chunk_dirs(corners: [Vector3; 3], tile_res: u32) -> Vec<Vector3>
Expand description

The texel-centre world directions of a chunk, row-major, tile_res² of them.

The same mapping the shaders use: barycentric texel centres over the chunk triangle, folded across the diagonal (u + v > 1) so the whole square holds valid data, then gnomonically projected onto the unit sphere by normalizing. Pure — safe to call from a worker thread.