Builtin Library
- ..
- README.md1.2 KB
- bindings.yaml170 B
- shader.wgsl1.8 KB
README.md
splat_velocity_merge
Merges the Gaussian-splat velocity accumulation into the frame's velocity buffer, so every consumer of that buffer — motion blur, temporal antialiasing, temporal upsampling, a denoiser's history term — sees a moving cloud move.
What it reads
| binding | holds |
|---|---|
splat_velocity | xy = each splat's NDC displacement summed premultiplied by its alpha, w = the coverage those splats add up to. The splat pass writes it as the second target of the Gaussian channel, composited "over" in the same sorted order as the colour. |
scene_motion | The frame's velocity buffer as the geometry passes left it. |
merged_out | Where the merged field lands. A copy lays it back over @scene.motion, because a pass cannot sample the attachment it renders into. |
The weight
w is coverage, and coverage is the weight. A texel the cloud fully covers
reports the cloud's displacement; a texel it half covers reports halfway
between the cloud and the surface behind it; a texel it never reached keeps
what the geometry passes wrote, bit for bit. That is the same weight the
cloud's colour arrived at the texel with, so what a velocity consumer treats
as moving is what the image shows moving.