Advanced search tips: use spaces to require multiple terms (AND), |
for alternatives (OR), wrap phrases in quotes (="a b"), =term for
exact match, 'term to include, !term to exclude, ^term to match
prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to
exclude suffix.
RGB channels: total inscattered light along the camera ray to the current sample.
A channel: average transmittance across all wavelengths to the current sample.
evaluates the rayleigh phase function, which describes the likelihood
of a rayleigh scattering event scattering light from the light direction towards the view
evaluates the henyey-greenstein phase function, which describes the likelihood
of a mie scattering event scattering light from the light direction towards the view
We assume the up vector at the view position is the y axis, since the world is locally flat/level.
t = distance along view ray in atmosphere space
NOTE: this means that if your world is actually spherical, this will be wrong.
Modified from skybox.wgsl. For this pass we don’t need to apply a separate sky transform or consider camera viewport.
w component is the cosine of the view direction with the view forward vector, to correct step distance at the edges of the viewport
FIXME: this function should be in bruneton_functions.wgsl, but because naga_oil doesn’t support cyclic imports it’s stuck here