Skip to main content

subsurface_scattering_approx

Function subsurface_scattering_approx 

Source
pub fn subsurface_scattering_approx(
    depth: f64,
    scatter_coeff: f64,
    absorption: f64,
) -> f64
Expand description

Approximate subsurface scattering transmittance.

Models the fraction of light that penetrates to depth below the surface, using a simple exponential Beer-Lambert model modified by the absorption coefficient.

ยงParameters

  • depth โ€“ penetration depth (metres, or consistent units).
  • scatter_coeff โ€“ scattering coefficient (1/m).
  • absorption โ€“ absorption coefficient (1/m).

Returns a value in \[0, 1\].