Shader filter (Glow)
Apply the built-in Glow filter to a sprite and animate its strength with a tween.
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.internalvs.externallists: internal filters affect just the object; external filters affect the object in its rendering context (typically full screen). Glow usually wantsexternalsince the light spreads beyond the source pixels.- The returned Controller is a normal object — properties like
outerStrength,innerStrength, andcolorare tween-friendly, which makes it trivial to animate the effect. - Note: Bloom isn’t a single filter. v3 had a
BloomFX; in v4 it’s composed viaPhaser.Actions.AddEffectBloom(target, config?), which sets up multiple filters internally viaParallelFilters. The Glow filter above is the simpler single-filter approximation. - See the Shaders guide for the full filter catalog, custom
Shadergame objects, and when to drop down to RenderNodes.