debanding.package
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 })
| Field | Default | Unit | Meaning |
|---|---|---|---|
strength | 1 | 0–1 | How much of the rebuilt gradient to blend in. 0 is the off switch and keeps the rest of the settings authored. |
threshold | 2.5 | eight-bit codes | Neighbourhood spread that still counts as flat. Raise to reach wider banding, lower to protect finer detail. |
radius | 12 | pixels | Outermost tap distance — the widest shelf this can cross. |
rings | 3 | count | Tap rings between the centre and radius. Each ring adds four taps per pixel. |
grain | 1 | eight-bit codes | Depth 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.