Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitcc6939bf11

README.md

atmo_aerial_lookup

Reads the aerial perspective volume (atmo_aerial_volume) the frame's atmo_aerial pass built for the camera being drawn: the light the air scatters toward the camera and the share of light it lets through, from the camera out to any point in front of it.

  • aerial_air(cam_p, dir, sun_dir, t_km): the air from a camera at cam_p (planet space) out to t_km kilometres along dir. The volume gives the air out to the last depth boundary in front of the point, and the stretch from there to the point is marched on top of it in AP_STRETCH_STEPS steps, so what a read costs is the same whatever aerialSteps is set to. A point under the ground level, past where the ray meets the ground, is seen through air as dense as at sea level beyond it (medium_at), which the same stretch marches.
  • aerial_volume_at(cell, k): what the volume holds at boundary k for the grid coordinate cell (ap_cell).

Included with #include "@builtin::systems.atmosphere.atmo_aerial_lookup" after atmo_common, atmo_transmittance_lookup, atmo_multiscatter_lookup, atmo_integrator and atmo_aerial_volume, by the aerial perspective (atmo_composite) and by the cloud layer, whose clouds are seen through the same air. The including shader binds aerial_volume, aerial_smp, transmittance_lut, multiscatter_lut and atmo_params (atmosphere.liveTables() names the first and the last three).