temporalUpscale.package
- ..
- README.md2.9 KB
- bindings.yaml483 B
- shader.wgsl12.2 KB
This package holds more than this page lists. See all of its files in its world.
README.md
taau_resolve
One composite-resolution pixel per invocation: read the presented frame, find where its surface was last frame, and mix the accumulation into it.
The pass runs at a post-scene phase, where @scene.color is the composited
image — the display's own resolution while the renderer presents the viewport
itself — while @scene.depth and @scene.motion stay at the resolution the
scene was rasterized into. Every read of the scene buffers maps the composite
pixel back into that grid; the velocity it finds there is in NDC, which is the
same span at either resolution.
| binding | what it is |
|---|---|
scene_color | the presented frame, composite resolution |
scene_depth | scene depth, scene resolution, reversed (near = 1) |
scene_motion | scene motion in NDC, scene resolution |
taau_history | what this pass resolved for this view last render, composite resolution |
taau_params | (historyWeight, neighbourhoodClamp, sharpness, motionRejection) |
frame_cam | the camera drawing this view; [13].xy is the NDC offset this render's projection carried, which is what places each scene sample inside the pixel |
taau_history_state | (historyValid, _, _, _) — the history target's own statement: 1 when taau_history holds this view's previous resolve, 0 on the view's first render and after a cut or a resize |
taau_out | this frame's resolve, composite resolution |
Each 8x8 workgroup first reads the scene texels its pixels gather from into workgroup memory, each once, then every pixel gathers its 4x4 from there. Every scene texel is read out of the presented frame by four loads blended at its own centre (one load at render scale 1, where the grids coincide), so reading it once per block rather than once per pixel that gathers it is what keeps the pass's reads set by the display's size.
Four things keep the accumulation honest:
- Sample-position weighting. Each of the 4x4 scene taps is weighted by how far its own sample landed from this pixel's centre, jitter included, the Gaussian taken as one weight per row times one per column — so a frame that sampled elsewhere contributes little and one that sampled here carries the pixel. Reading the same neighbourhood unweighted would average away exactly the detail the jitter sequence is resolving.
- Velocity dilation. The velocity is taken from the nearest of the 3x3 scene neighbourhood, so a silhouette sweeping across the pixel reprojects along the surface that is actually moving over it.
- Neighbourhood clipping. The history is pulled toward the mean of the current frame's own neighbourhood, along the line between the two, only as far as it takes to enter the colour box that neighbourhood spans.
- Motion-weighted feedback. A long reprojection keeps less of the accumulation, which is what stops a fast object trailing behind itself.