Builtin Library
README.md
gradientDeband
The compute pass behind the Debanding component. One dispatch over the frame
at afterLighting order 480, composited at 482 — after the effects that build
gradients of their own (bloom, fog, exposure) and before antialiasing and
sharpening, 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 two vec4<f32>:
[0] = (threshold, radius, grain, rings)
[1] = (strength, _, _, _)
threshold reaches the shader already divided by 255, so it is in the same
units as the texture samples; grain stays in code values and is divided in the
shader.
The pass reconstructs a sub-code value from rings of taps, then dithers it so the reconstruction survives the eight-bit store. The package readme covers why it needs both halves.