Builtin Library
- ..
- README.md1.2 KB
- module.wgsl3.9 KB
README.md
cloud_shadow
The cloud layer's shadow at a point in the world, for any pass that lights something by the sun: a surface, a fog, a shaft of light, a participating medium.
cloud_shadow_through_at(p, cam, to_sun)— the share of the sun's light the cloud lets through betweenpand the sun: the whole line for a point under the layer, the part above it for a point inside it, all of it over the layer. 1 while no layer casts a shadow, while the sun is below the horizon, and past the map's reach (toward which the shadow fades over the last fifth).cloud_shadow_optical_depth(p, cam, to_sun)— the optical depth of that cloud,-logof the share above.cloud_shadow_transmittance(p, cam, to_sun)— the share of the sun's light that reachesp, at the strength the layer casts with.
A render pass binds what @builtin::systems.volumetrics.cloudShadow's
bindings() names and declares:
- { name: cloud_shadow_map, kind: texture2d }
- { name: cloud_shadow_smp, kind: sampler, filter: linear, address: clamp }
- { name: cloud_shadow, kind: buffer, access: read, element: vec4<f32> }
Includes
cloud_shellcloud_shadow_space