postprocess
The postprocess namespace — the engine's Luau API reference for postprocess.
The postprocess namespace — 7 functions.
globals/postprocess/add
globals/postprocess/add(name: string, source: string, opts: PostprocessOpts?) -> boolean
Queue registration of a fullscreen post-process effect. The
effect is applied on the next frame. source is WGSL providing ONLY
fn fragment(in: PostInput) -> vec4<f32>; the engine generates the
group(0) framework + schema-driven group(1) from opts.properties.
Effects run in priority order (lower first, default 100).
globals/postprocess/list
globals/postprocess/list() -> { string }
List all registered post-process effect names in renderer priority order (lower priority runs first).
globals/postprocess/remove
globals/postprocess/remove(name: string) -> boolean
Queue removal of a post-process effect. Takes effect on the next frame. Removing a name that isn't registered is a silent no-op.
globals/postprocess/setEnabled
globals/postprocess/setEnabled(name: string, enabled: boolean) -> boolean
Queue an enable/disable toggle on a registered post-process effect. Targeting an unknown name is a silent no-op.
globals/postprocess/setProperty
globals/postprocess/setProperty(name: string, prop: string, value: (number | { number })) -> boolean
Queue a named material-property update on a registered
post-process effect. The property must be declared in the effect's
properties schema; read in WGSL as material.<prop>. value is a
number or a number array (vec/color). Targeting an unknown effect or
an undeclared property is a silent no-op.
globals/postprocess/setSampler
globals/postprocess/setSampler(name: string, opts: { [string]: any }) -> boolean
Configure the per-effect user sampler shared by the effect's declared texture properties. opts.filter = "linear" (default) or "nearest". opts.wrap (alias .address) = "clamp" (default), "repeat", or "mirror" — applied to all axes.
globals/postprocess/setTexture
globals/postprocess/setTexture(name: string, prop: string, path: string) -> boolean
Bind a texture to one of an effect's declared texture properties.
Declare it in properties ({ name = "noise", type = "texture" }) and
sample in WGSL as textureSample(noise, noise_sampler, in.uv). path
is any TextureCache-resolvable spec (@builtin::textures.foo,
color:1,0,0, default:white, a render-target name, ...). Targeting
an unknown effect / property or unresolvable path silently no-ops.