Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit6c08267298

README.md

cloud_shell

The cloud layer as a shell around the planet: the band between two altitudes over the ground, centred on a planet whose centre stands straight below the camera being drawn. The layer reaches the horizon in every direction, recedes into a thin band where it meets it, and curves away under a camera high above it. The radius is the one PhysicalAtmosphere integrates over (6360 km times its worldUnitsPerKm), so clouds and sky share one horizon.

  • cloud_shell_sphere(alt0, dir_y, radius, a) — the nearer and farther distances along a ray to the sphere of altitude a.
  • cloud_shell_span(alt0, dir_y, radius, base, top) — the stretch of a ray inside the layer, from a camera below, inside or above it.
  • cloud_shell_altitude(offset, alt0, radius) — the altitude of a point given as its offset from the camera.

Every sum is taken relative to the camera, which keeps an f32 precise at a planet's radius.