Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

Debanding

The scene's smooth gradients, as a component. Attach one to any entity — the effect is a property of the image rather than of an object, so a single instance covers the scene.

local id = entity.spawn("debanding").id
entity(id).component.add("Debanding", { threshold = 3, radius = 16 })
FieldDefaultUnitMeaning
strength10–1How much of the rebuilt gradient to blend in. 0 is the off switch and keeps the rest of the settings authored.
threshold2.5eight-bit codesNeighbourhood spread that still counts as flat. Raise to reach wider banding, lower to protect finer detail.
radius12pixelsOutermost tap distance — the widest shelf this can cross.
rings3countTap rings between the centre and radius. Each ring adds four taps per pixel.
grain1eight-bit codesDither amplitude. One code carries a rebuilt value across a boundary; more reads as grain.

Editing a field in the inspector re-pushes it, and the values persist with the scene like any other component. Several in one scene share one effect: the one edited last is in force, removing it hands the effect to the newest of the others, and only removing the last one turns debanding off. The work runs in gradientDeband.renderFeature, driven through @builtin::systems.debanding.debanding.