the current renderer instance
Optionaloptions: { intensity?: number } = {}effect options
Optionalintensity?: numberinversion intensity (0.0 = original, 1.0 = fully inverted)
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).
Apply a brightness adjustment.
brightness multiplier (1.0 = normal, >1 brighter, <1 darker)
this instance for chaining
Apply a contrast adjustment.
contrast multiplier (1.0 = normal, >1 more contrast, <1 less)
this instance for chaining
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.
Apply a hue rotation.
rotation angle in radians
this instance for chaining
Apply a color inversion.
Optionalamount: number = 1.0inversion amount (0.0 = original, 1.0 = fully inverted)
this instance for chaining
Multiply the current matrix by another color matrix.
the matrix to multiply with
this instance for chaining
Reset the color matrix to identity (no color change).
this instance for chaining
Apply a saturation adjustment.
saturation level (0.0 = grayscale, 1.0 = normal, >1 over-saturated)
this instance for chaining
Apply a sepia tone.
Optionalamount: number = 1.0sepia intensity (0.0 = original, 1.0 = full sepia)
this instance for chaining
set the inversion intensity
inversion intensity (0.0 = original, 1.0 = fully inverted)
Set the uniform to the given value
the uniform name
the value to assign to that uniform
Multiplies the current matrix with a transform described by individual values. Accepts either 6 values (2D affine: a, b, c, d, e, f) or 16 values (full 4x4 column-major).
6 or 16 numeric values
this instance for chaining
A shader effect that inverts the colors of the sprite. Commonly used for damage feedback, negative image, or X-ray effects.
See
Renderable.shader for usage
Example
Example