Builtin Library
- ..
- README.md1.4 KB
- bindings.yaml307 B
- shader.wgsl6.5 KB
README.md
cloud_taa
Cloud TAA composite — temporal anti-aliasing for the raymarch output. Reprojects
last frame's blended output through the previous view-projection, color-clamps the
history to the current sample's neighborhood to suppress ghosting, and exponentially
blends the two. Writes both the next-frame history slot and the externally-sampled
scene_volumetric_sky texture the composite path reads.
Reprojection runs through the world point named by uniform [37], the NDC z of the
range the cloud stands at along the view ray — volumetricSky.reprojectionDepthNdc
computes it. 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.
Bindings (see bindings.yaml — slot order must match the Luau dispatch): cur_tex
(texture2d), hist_prev (texture2d), smp (sampler), out_hist (storage2d
rgba16f), out_scene (storage2d rgba16f), U (read array<f32> uniforms).
Usage: dispatch by identity with compute.dispatchEx("@builtin::systems.volumetrics.shaders.cloud_taa", ...) (textures/sampler/storage textures require resource binding, not positional buffers) —
it resolves to the shader's stable guid and auto-compiles on first use (no setup).