cloud_shell.shaderModule
- README.md939 B
- module.wgsl2.7 KB
This package holds more than this page lists. See all of its files in its world.
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 altitudea.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.