Module cube
Expand description
Cubemap face primitives.
CubeFace enumerates the six faces of an axis-aligned cube in the
order wgpu expects when indexing a texture_cube / texture_cube_array:
0: +X 1: -X 2: +Y 3: -Y 4: +Z 5: -ZIt is the foundation for omnidirectional shadow mapping (point-light
shadows), reflection probes, IBL, and any other code path that needs to
enumerate or sample a cube’s faces. The “up” vector returned by
CubeFace::up matches the cubemap convention used by wgpu / Vulkan /
D3D11 — the +Y / −Y faces use ±Z as their up vector to avoid the
singularity where look_at_rh(eye, eye + Y, Y) is degenerate.
Enums§
- Cube
Face - One of the six faces of an axis-aligned cube.