~1 min read

Shader filter (Glow)

Apply the built-in Glow filter to a sprite and animate its strength with a tween.

Glow filter on a sprite Phaser 4 · sandboxed

Notes

  • filters.external.addGlow(color?, outerStrength?, innerStrength?, ...) is one of Phaser 4’s built-in filters. The full set: Barrel, Blend, Blocky, Blur, Bokeh, ColorMatrix, CombineColorMatrix, Displacement, Glow, GradientMap, ImageLight, Key, Mask, NormalTools, PanoramaBlur, ParallelFilters, Pixelate, Quantize, Sampler, Shadow, Threshold, TiltShift, Vignette, Wipe.
  • internal vs. external lists: internal filters affect just the object; external filters affect the object in its rendering context (typically full screen). Glow usually wants external since the light spreads beyond the source pixels.
  • The returned Controller is a normal object — properties like outerStrength, innerStrength, and color are tween-friendly, which makes it trivial to animate the effect.
  • Note: Bloom isn’t a single filter. v3 had a Bloom FX; in v4 it’s composed via Phaser.Actions.AddEffectBloom(target, config?), which sets up multiple filters internally via ParallelFilters. The Glow filter above is the simpler single-filter approximation.
  • See the Shaders guide for the full filter catalog, custom Shader game objects, and when to drop down to RenderNodes.