cloud_shadow_carry.computeShader
- README.md2.1 KB
- bindings.yaml1.9 KB
- shader.wgsl6.5 KB
This package holds more than this page lists. See all of its files in its world.
README.md
cloud_shadow_carry
The cloud layer's shadow map carried over from the view's previous render into
this one. Each texel's line toward the sun is found in the map the view's
previous render wrote, by where it crosses the layer's base, and its value is
taken from there: a camera that stands still under a still sky takes every
texel as it stood, and a camera that moves, a sun that turns and a wind that
carries the clouds move the map with them. A line the previous map cannot
answer for is marched here instead (cloud_shadow_march): every line on the
view's first render, after a cut, after a change of what the clouds are formed
from, a turn of the sun of more than a quarter of a degree, a wind that
carried the clouds through more than a sixty-fourth of their shape noise's
tile since the previous map (where they are other clouds), or one sinking them
through the noise fast enough to sink them more than a 128th of the tile over
the 16 renders a carried line can stand (the sinking changes their form, and a
long render lets the wind carry them further); and a line the previous map
holds outside its reach or more coarsely than this one does.
The first thread writes the record of what this map is written for (the
generation of the clouds' form, the camera, the lines' direction, the step of
the refresh this render takes, where in the shape noise the clouds were read)
into
record_out, which the view's next render recalls (cloud_shadow_recall),
and counts the render in the map's counter.
Includes
@builtin::shaderModules.frame_lightcloud_shadow_march
Bindings
| name | kind |
|---|---|
shape | texture3d |
detail | texture3d |
weather | texture3d |
noise_smp | sampler |
U | buffer |
frame_cam | buffer |
scene_light | buffer |
cloud_shadow | buffer |
history | texture2d |
history_smp | sampler |
recalled | buffer |
record_out | storage2d (rgba32f) |
cloud_shadow_count | buffer (atomic<u32>) |
shadow_out | storage2d (rgba16f) |