Search across packages, versions, files, declarations, and comments.
Use multiple terms to narrow results (AND), and add @vertex,
@fragment, or @compute to filter by shader stage.
RGB channels: total inscattered light along the camera ray to the current sample.
A channel: average transmittance across all wavelengths to the current sample.
calling with component = 0.0 will return the atmosphere’s absorption density,
while calling with component = 1.0 will return the atmosphere’s scattering density.
samples from the atmosphere scattering LUT. neg_LdotV is the dot product
of the light direction and the incoming view vector.
Nonlinear phase mapping to mitigate banding in low-resolution LUTs.
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.wesl. For this pass we don’t need to apply a separate sky transform or consider camera viewport.
Returns a normalized ray direction in world space.
RGB channels: total inscattered light along the camera ray to the current sample. A channel: average transmittance across all wavelengths to the current sample.