the current renderer instance
Optionaloptions: { size?: number; strength?: number } = {}effect options
Optionalsize?: numbervignette spread multiplier (higher = smaller dark area)
Optionalstrength?: numberedge darkening power (lower = stronger darkening, higher = softer falloff)
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 vignette size
spread multiplier (higher = smaller dark area)
set the vignette strength
edge darkening power (lower = stronger, higher = softer)
Set the uniform to the given value
the uniform name
the value to assign to that uniform
A shader effect that darkens the edges of the screen, drawing focus to the center. Commonly used for atmosphere, cinematic feel, or to naturally frame a camera viewport (e.g. minimap).
See
Renderable.shader for usage
Example
Example