# Cloud rendering references

The `/lab/` page is an experiment, not ten scientifically validated cloud presets.

## Takram

- https://github.com/takram-design-engineering/three-geospatial
- @takram/three-clouds 0.7.6, atmosphere 0.19.1, geospatial 0.9.1.
- MIT license: [takram/LICENSE.txt](takram/LICENSE.txt).
- Cloud assets: revision 45a1c6c1bb9fd38b3680fd120795ff4c32df68ff.
- Atmosphere lookup tables: revision eac103980f20c0956f2d3215833e73514be08462.
- STBN data: revision 9627216cc50057994c98a2118f3c4a23765d43b9.
- STBN texture data originates from NVIDIA's Spatiotemporal Blue Noise SDK: https://github.com/NVIDIA-RTX/STBN. Its upstream [license](takram/STBN-LICENSE.txt) is included separately; do not assume this asset is covered by Takram's MIT license.
- Volume rendering follows the official vanilla Three.js example. The application integrates wind and evolution offsets separately, with explicit pause, time scaling and stepping.

## Photon

- Copyright (c) 2021-2025 Benjamin Stott (SixthSurge).
- https://github.com/sixthsurge/photon
- Source revision: 15458c0937f8647c37eb6a501bef5eb3bf3da31b.
- Source files: `shaders/include/sky/clouds/cirrus.glsl`, `common.glsl`, `shaders/include/utility/random.glsl`, `shaders/image/noise.png`.
- Full custom license: [photon/LICENSE.txt](photon/LICENSE.txt). Photon code/assets are not MIT licensed. Redistribution is subject to the upstream license, including its monetization restrictions.
- `src/lab/photon.frag.glsl` retains the earlier cirrus and cirrocumulus density functions and curl noise, with the original noise texture. The lab now uses this effect only for cirrocumulus; cirrus is rendered by the separate model described below. Independent evolution time, browser coordinates, a thin layer and simplified lighting are adaptations. Solar elevation and azimuth drive all lab modes; thin-cloud sunlight colour is sampled from Takram's atmospheric transmittance LUT. This does not reproduce Photon's complete lighting pipeline or imply identical visuals.
- `src/shaders/cirrocumulus.glsl` also adapts Photon density, curl noise and multi-scale erosion for the home atlas, using the same original noise texture. Separate coverage, local ripple organisation, ground-view projection, a smooth height profile, four-sample optical-depth integration and mipmap filtering are project adaptations. Home lighting remains simplified; it is not the complete Photon renderer.
- Gradient-noise derivative credited upstream to Inigo Quilez: https://iquilezles.org/articles/gradientnoise/
- Hash credited upstream to Dave Hoskins: https://www.shadertoy.com/view/4djSRW

## Cirrus morphology research

- Visual targets: WMO International Cloud Atlas, [Cirrus fibratus and uncinus](https://cloudatlas.wmo.int/en/ch-1.html); Met Office, [Cloud types for observers](https://www.metoffice.gov.uk/api/assets/file/cloud_types_for_observers_rev_2014pdf?prefix=assets), printed page 33. No photographs are bundled with the application.
- Hogan, R. J. and Kew, S. F. (2005), _A 3D stochastic cloud model for investigating the radiative properties of inhomogeneous cirrus clouds_, Q. J. R. Meteorol. Soc., 131, 2585-2608: https://doi.org/10.1256/qj.04.144.
- `src/lab/cirrus.frag.glsl` is an original, morphology-driven approximation inspired by the paper's description of fallstreak displacement, wind shear and the spread of ice fall speeds. It uses sparse generating regions, height-dependent analytical trajectories, anisotropic texture detail, and thin-volume optical-depth integration. It does not implement the paper's Fourier-spectrum model, sedimentation microphysics, or a numerical weather solver.
- No Cloudgen source code or datasets were incorporated. Cloudgen's publicly available implementation is GPL-2.0: https://github.com/kprussing/cloudgen. The lab reuses the existing Takram shape texture for fibre modulation and Takram atmospheric lookup tables for lighting; it adds no external runtime assets.
- `src/lab/CirrusEffect.ts` renders to a reduced-resolution HDR target and filters four deterministic sampling phases with a short history. Edits and seeks reset the history; disabling the cirrus pass stops its rendering. These are project rendering adaptations, not Cloudgen or Photon code.

All cloud-rendering reference assets are served locally; loading those assets makes no runtime requests to GitHub or other external texture hosts. The home atlas separately loads web fonts from Google Fonts, with system-font fallbacks.
