Builtin Library
- ..
- README.md1.3 KB
- bindings.yaml399 B
- shader.wgsl6.6 KB
README.md
taa_resolve
Carries one frame's accumulation forward into the next. Finds where each pixel's surface was last frame, reads what that frame decided there, and mixes a little of this frame's sample into it — so a silhouette gains a gradient and a specular highlight stops flashing as it crosses the sample point.
The history is only usable where it still describes the same surface. Velocity is taken from the nearest pixel of the 3x3 neighbourhood, a reprojection off the frame starts over, and what survives is clipped into the neighbourhood's own colour statistics in YCoCg along the line from the mean — which is what stops a newly-uncovered pixel from trusting the history of whatever was covering it.
Bindings
| name | kind |
|---|---|
scene_color | texture2d |
scene_depth | texture_depth |
scene_motion | texture2d |
taa_history | texture2d |
taa_params | buffer |
taa_state | buffer |
taa_out | storage2d (rgba16f) |
taa_params carries the tuning, packed by
@builtin::systems.antiAliasing.temporalAntiAliasing. taa_state is the
history target's state buffer, written by the engine before each render of a
view: x whether taa_history holds that view's previous result, y how many
renders in a row have carried it, zw the render's sub-pixel offset in pixels.