pub fn optical_depth(
start: Vec3,
dir: Vec3,
atm: &AtmosphereParams,
n_steps: usize,
) -> Vec2Expand description
Compute the optical depth (column density) from start to the atmosphere
boundary, and also toward the sun for shadow computation.
Returns Vec2(rayleigh_depth, mie_depth).
§Parameters
start— starting position in world space (planet-centred, metres)dir— ray direction (normalised)atm— atmosphere parametersn_steps— number of integration steps