Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit61a33237e0

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.

BindingKindContents
scene_colortexture2d@scene.color — the frame so far.
deband_paramsbufferSettings, packed by debanding.module.
deband_outstorage2dThe 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.