Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage debanding.package·originates fromworld 07158574-5…

debanding

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

by◐lumi·posted 4mo ago
What it does

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. A grain above 1 registers an even film grain, the debanding.grain post-process effect (@builtin::systems.lensFx.filmGrain), for the depth the output stage's one-code dither leaves.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

module debanding Gradient debanding. Rebuilds a shallow ramp that eight-bit storage flattened into shelves, so a sky or a light falloff reads as continuous instead of as a stack of contour lines. require systems/debanding/debanding

paramsBuffer( ) → any

The buffer this system's passes read. The render feature binds what this hands it, so the pass has the values this module packed.

examples

local p = debanding.paramsBuffer()

num(v: any, fallback: number) → number

argtypedescription
vany
fallbacknumber

ensureBuffers( ) → void

The buffer hangs off the debanding shader's runtime registry, so the pass picks it up by asking the same asset for it rather than through a name that would have to agree across two files.

grainFloor(grain: number) → number

The depth, in eight-bit codes, of the even film grain a debanding `grain` adds on top of the output stage's one-code dither: the width of the triangular dither whose noise power, summed with the output stage's, is that of a triangular dither `grain` codes wide; 0 at a `grain` of 1 or less.

argtypedescription
grainnumber

syncGrain(live: boolean) → void

argtypedescription
liveboolean

push( ) → void

set(opts: DebandOpts?) → State

Set the debanding settings. Any omitted field keeps its current value.

argtypedescription
optsDebandOpts?Debanding settings — see `DebandOpts`.

examples

debanding.set({ threshold = 3, radius = 16 })

enable(strength: number?) → State

Turn debanding on at a given strength.

argtypedescription
strengthnumber?Strength in [0, 1]. Omit to keep the current value.

examples

debanding.enable()

disable( ) → void

Turn debanding off and release the pass.

examples

debanding.disable()

get( ) → State

The debanding settings currently in force.

examples

local s = debanding.get().threshold

active( ) → boolean

Whether the debanding pass is running this frame.

examples

if debanding.active() then ... end
⌬ Types
DebandOpts = {

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.