Skip to main content
Shaders for Games (GLSL) Lesson 20 of 20

Capstone: a living fire

Combine everything — noise, fBm, color and time — into one rich, animated effect.

This is where it all comes together. Every real shader effect — fire, smoke, water, magic, clouds — is a handful of the pieces you have learned, layered: coordinates shape it, fBm gives it organic detail, mix() colors it, and u_time makes it live. The one new trick that ties them into something that looks alive is DOMAIN WARPING.

Domain warping is a simple, powerful idea: before you sample your noise, distort the coordinate you feed it — with more noise. Instead of fbm(st), you compute fbm(st + fbm(st)). The space itself bends and swirls, and a flat cloud turns into rolling smoke or curling flame. It is the single most-used technique in shader art, and it is one line.

That is a complete, game-ready effect built entirely from this course: a hash, value noise, fBm, a domain warp, a mix() color ramp, and u_time. Nothing here is beyond what you have already done — it is those pieces, stacked.

Tip This one is yours to remix. Swap the warm ramp for blues and slow the time down and you have water or smoke; push the colors to greens and it is a toxic fog. Change one number at a time and watch what it does — that is exactly how shader artists work.
Quick check

Domain warping means:

▶ Build your own effect Start from this fire and remix it: change the color ramp, the warp strength (4.0), or the time speed to make water, smoke or clouds.
Wayline
Tools, assets and tutorials for game makers
Get started