← All demos

Skybox from a cube map

Six faces generated on the CPU — horizon gradient, zenith, sun disk — uploaded through a CubemapTexture and sampled per pixel along the view ray with samplerCube. Drag the canvas to look around.

6 faces — 1 samplerCube
Skybox — drag to look, adjust the field of view below CubemapTexture
0.60

The same CubemapTexture drives reflections and environment lighting — anywhere GLSL wants a samplerCube. API reference: CubemapTexture.