the current renderer instance
Optionaloptions: { curvature?: number; opacity?: number; vignetteStrength?: number } = {}effect options
Optionalcurvature?: numberbarrel distortion strength (0.0 = flat, 0.02 = subtle CRT curve)
Optionalopacity?: numberscanline darkness (0.0 = invisible, 1.0 = fully black lines)
OptionalvignetteStrength?: numberedge darkening strength (0.0 = none, 0.3 = subtle)
Readonlydestroyedtrue once destroy has been called. Distinct from
enabled — which also toggles transiently across a context
lost / restored cycle — to give callers a stable signal for
"this effect has been explicitly released."
whether this effect is active (false in Canvas mode, false after
destroy, and false while the WebGL context is suspended
between an ONCONTEXT_LOST and the matching ONCONTEXT_RESTORED
event).
destroy this shader effect. Idempotent — calling destroy twice is safe. Unsubscribes from the renderer's context-lost / restored events so a destroyed effect is not auto-reactivated.
set the barrel curvature strength
distortion amount (0.0 = flat)
set the scanline opacity
scanline darkness (0.0–1.0)
Set the uniform to the given value
the uniform name
the value to assign to that uniform
set the vignette strength
edge darkening (0.0 = none)
A shader effect that overlays horizontal scanlines on the sprite. Can optionally add barrel distortion and vignette for a full CRT monitor look.
See
Renderable.shader for usage
Example
Example