Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit61a33237e0

README.md

debanding

The API behind the Debanding component. Use it directly when the settings are driven by script rather than authored on an entity.

local Deband = require("@builtin::systems.debanding.debanding")

Deband.enable()                                   -- on at full strength
Deband.set({ threshold = 3, radius = 16 })        -- any omitted field is kept
local s = Deband.get()                            -- a copy of the settings
Deband.active()                                   -- is the pass running?
Deband.disable()                                  -- off, and the pass released

The module owns the settings, packs them into the deband_params buffer the pass reads, and ties the feature's lifetime to whether debanding is on. At zero strength the pass is released, so a scene that is not debanding pays nothing and renders exactly as it would without the package.

threshold and grain are given in eight-bit code values because that is the unit banding is measured in — see the package readme for what the pass does with them.