Log inGet started
Package

debanding.package

Newest version

This package holds more than this page lists. See all of its files in its world.

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 codesDepth of the noise over the rebuilt ramp: the width of a triangular dither on each side. 1 is the output stage's dither, which carries a rebuilt value across a boundary; a deeper one adds an even film grain on top of it.

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.