Talos docs

ScreenEffectsHandle

Since next

The params of the scene's kind: post screen effects (meta.render.screenEffects), set from a behaviour: a rain streak's strength, a vignette's radius.

Plain text

See docs/SHADERS.md.

Signature

export interface ScreenEffectsHandle {
  /**
   * Sets one param of a screen effect over the value the scene gives it, from the next frame until
   * the world restarts (a hot reload keeps it). `effect` is the effect's shader as
   * `meta.render.screenEffects` writes it (every entry running that file), or its index in that
   * list; `value` is what its `//! param` line declares, as {@link RenderHandle.setMaterialParam}
   * takes it. A buffer write, no rebuild: cheap every tick. An effect or param the scene does not
   * have, or a value of the wrong type, is one `screen-effects.param-refused` warning. Throws
   * `screen-effects.param-invalid` for an `effect` that is neither (a `TypeError`) or a number that
   * is not finite (a `RangeError`).
   */
  setParam(effect: string | number, param: string, value: ShaderParamValue): void
}

Import: import type { ScreenEffectsHandle } from "@argus/api"

Members

MemberSignatureDescription
setParamsetParam(effect: string | number, param: string, value: ShaderParamValue): voidSets one param of a screen effect over the value the scene gives it, from the next frame until the world restarts (a hot reload keeps it). effect is the effect's shader as meta.render.screenEffects writes it (every entry running that file), or its index in that list; value is what its //! param line declares, as {@link RenderHandle.setMaterialParam} takes it. A buffer write, no rebuild: cheap every tick. An effect or param the scene does not have, or a value of the wrong type, is one screen-effects.param-refused warning. Throws screen-effects.param-invalid for an effect that is neither (a TypeError) or a number that is not finite (a RangeError).