debanding.package
This package holds more than this page lists. See all of its files in its world.
README.md
gradientDeband
The compute pass behind the Debanding component. One dispatch over the frame
in the display stage, at local order 10, composited at 12: on the code values
the display transform wrote, after the effects that build gradients of their own
(bloom, fog, the tone curve) and before antialiasing and sharpening (local 20
and up), so those run on a frame that no longer has contours in it to work
with.
| Binding | Kind | Contents |
|---|---|---|
scene_color | texture2d | @scene.color — the frame so far. |
deband_params | buffer | Settings, packed by debanding.module. |
deband_out | storage2d | The debanded frame. |
deband_params holds one vec4<f32>:
[0] = (threshold, radius, strength, rings)
threshold reaches the shader already divided by 255, so it is in the same
units as the texture samples.
The pass reconstructs a sub-code value from rings of taps and writes it in float; the output stage's dither rounds it to the surface. The package readme covers why the reconstruction needs that dither.