cloud_taa.computeShader
- README.md1.7 KB
- bindings.yaml652 B
- shader.wgsl7.0 KB
This package holds more than this page lists. See all of its files in its world.
README.md
cloud_taa
The cloud layer's temporal accumulation, per view. Each view the frame draws
(the viewport, every camera rendering into a texture, every capture) runs it
against the images of a history target that belong to that view: hist_prev,
what the view's previous render accumulated, and out_hist, what this render
accumulates. hist_state (the target's state buffer) says whether hist_prev
holds that previous render; where it does not, the raymarch is the accumulation.
History is reprojected through the view's own matrices (@frame.camera: its
inverse view-projection, its position and its previous render's
view-projection), through the point at the middle of each view ray's traversal
of the cloud volume, where the cloud that ray sees stands. It is clamped to the
3x3 neighbourhood of this render's raymarch, coverage included, and blended
with weight blend_alpha on the current sample. The weight the history carries
falls to zero across the last REPROJECT_BORDER_TEXELS of the reprojected
frame, so a pixel whose history lies off the previous frame reaches the
raymarch's own output down a gradient rather than across a line.
The grid covers out_hist, at the view's size scaled as the layer is; the
raymarch output is read by UV.
Bindings (by name, see bindings.yaml): cur_tex (texture2d), hist_prev
(texture2d), smp (sampler), out_hist (storage2d rgba16f), frame_cam,
hist_state (read array<vec4<f32>>), U (read array<f32>: the volume's
corners at [0..2] and [4..6], blend_alpha at [8]).
The volumetricSky module enqueues it as a render-feature pass; it reads the
frame's camera and a history target, so it runs inside a view's render.