# Volumetric clouds

Source: https://github.com/leoawen/volumetric_cloud_atmosphere_scattering
Author: Leonardo Soares Gonçalves
Revision: 776e26865b4b01e789f5be28dffd4d39055e3acf
Retrieved: 2026-10-20
License: MIT; retained verbatim in LICENSE.
Original index.html SHA-256: c287375abb92c085cbb45b22aee60b6fa7e402d492afae2723bd8b8b01b96fa2

Adapted CloudGeneratorShader periodicNoise, worleyNoise and Perlin/Worley shaping into the local offline baker. Adapted sampleCloud height shaping / density remapping and the raymarcher's Beer-Lambert absorption, powder lighting and front-to-back accumulation into ../../clouds.mjs. That file emits the same math for native WGSL and WebGL2 GLSL.

DroneFriends adaptations: 1.3–2.4 km cloud layer; fixed 32-step native and 40-step fallback view march, three sun probes, periodic camera/wind coordinates independent of terrain rebasing, spatial detail filtering, per-sample atmospheric fade, sky LUT lighting, a half-resolution current-frame native cloud target, and the existing environment cube for water reflections. No temporal accumulation, remote runtime services, or Three.js runtime added. Aurora remains clear. This is a sky-background renderer; terrain/surface depth still takes precedence over cloud rendering (not a terrain-occluding flight-through fog simulation).

shape-64.rg8: deterministic 64×64×64 RG8 noise volume (512 KiB; two interleaved channels, x fastest), shared by both renderers. It is generated locally, not a downloaded photograph or model. SHA-256: 346864ecd8f2ba75407e70c760b92a5877057a305dbd0d90ddd3baf69cc79a0b.
The reproducible baker is scripts/bake-fpv-clouds.mjs.
