All examples · Sprites and 2D

Glowing sprites

What this example shows

createSprite({ blend: 'additive' }) adds the sprite's colour to what is behind it instead of covering it, so it can only brighten: the halos round the lamps, the saucer's beam, the fireflies.

Click or press Space to switch to ordinary 'alpha'. Over the black walls the two look alike, but under 'alpha' the windows inside each halo and the sky behind the beam go dull, and where two halos cross it is no brighter than one.

blend can change any frame, and works the same on WebGPU and WebGL2, with a material of its own too.

Starting