antiAliasing.package
- ..
- README.md3.0 KB
- module.wgsl12.6 KB
This package holds more than this page lists. See all of its files in its world.
README.md
temporal_resolve
The temporal resolve: how a frame's sample is folded into the history a
temporal reconstruction carries. Temporal antialiasing (taa_resolve, the
resolve at render scale 1) and temporal upscaling
(@builtin::systems.temporalUpscale.taau_resolve, the same resolve onto a
display grid larger than the raster) both accumulate through it.
#include "@builtin::systems.antiAliasing.temporal_resolve"
| function | what it is |
|---|---|
temporal_compress / temporal_expand | Light into the reversible tonemapped space every sample is weighed in (each colour over one plus its luminance), and back. |
temporal_ycocg / temporal_rgb | The YCoCg space the clip runs in, and back. |
temporal_tap_weight(d) | The weight a sample landing d pixels from a pixel's centre carries: a Gaussian fitted to a Blackman-Harris window. |
temporal_tap_weight_axis(d) | That weight along one axis; the Gaussian separates, so temporal_tap_weight(d) is the product of its two axes' weights and a gather over a grid of taps takes one per row and one per column. |
temporal_history_catmull_rom(history, p, dims) | The history read at p through a Catmull-Rom spline over the 4x4 footprint less its corners, which keeps the contrast a bilinear read averages away on every reprojection. |
temporal_neighbourhood_new / temporal_neighbourhood_add | The current frame's samples around the pixel, as a running sum and sum of squares in the compressed YCoCg space. |
temporal_clip(lo, hi, center, history) | The history moved toward the centre only as far as it takes to enter the box. |
temporal_clip_history(nb, current, history, gamma) | The variance clip alone: the history clipped to the neighbourhood's mean plus or minus gamma standard deviations (the box stretched to hold the current sample), with the frame's sample, both in the compressed YCoCg space, and moved, how far the clip moved the history (0 to 1). |
temporal_blend(clip, share) | A clip's history with share of the frame's sample mixed in. Returns light. |
temporal_accumulate(nb, current, history, gamma, alpha, reset) | One frame folded in at a fixed share: the clip, the frame's share alpha halved where the history passed the clip untouched (anti-flicker), and taken toward the current sample alone as reset rises (a disoccluded pixel, or one reprojected off the frame). Returns light. |
temporal_estimate_new(), temporal_estimate_add(e, sample, d), temporal_estimate(e) | The current frame's estimate of a pixel from its 3x3 samples, gathered one sample at a time: each sample is weighted by temporal_tap_weight at d, where the render's sub-pixel offset landed it against the pixel's centre, so the estimate moves little as the jitter visits the pixel. temporal_estimate returns light. |
Each pass supplies what is particular to its grids: where its current sample comes from, where its history is read, and how far it trusts the reprojection.