Click the image to start the effect
How it works
Basically there are two maps, the heat map and the cooldown map. The cooldown map is generated using a noise function similar to perlin noise.
The noise texture is generated by first randomizing the alpha values and then drawing scaled versions of the noise texture onto itself. The high frequency noise was increased to create more flickering in the flames. The heat map is what you see before you click on the example. The algorithm then basically works like this:
- Noise is draw on top of image to cool it down
- The whole image is shifted up one row
- The heat map is applied to 'heat up' the pixels
For more details just read the source and feel free to ask questions.