Skip to content
Lab

Playable · WebGPU

Magic

A ring of standing stones on a hill at dusk. Hold the mouse button to charge a spell and release to throw it at the crystals.

  • Shaders
  • Particles
  • Lighting
Magic, a screenshot

Play in browser · 36 MB

Keyboard and mouse recommended

What it shows

This one is about rendering. A spell uses most of what the engine can draw. The ball of energy is a mesh with a custom shader that distorts one noise texture with another. The trail is a ribbon mesh rebuilt every frame from the last fraction of a second of the spell’s path. The sparks, wisps and embers are particles moved by curl noise, with soft edges where they meet the ground. The spell is also a light source, so it lights the stones as it passes and shows in the night haze.

A quick click throws a small spark. Holding for a second and a half charges a full blast. The crystals on the pedestals shatter when a spell hits them, then the pieces fly back together.

More from the lab

All demos