Godot developer Loop_Box shared the simple shader behind this stylized flamethrower fire effect.
Good-looking fire often looks much more complicated than it really is.
For this flamethrower turret, developer
Loop_Box did not build a new shader from scratch. They reused a
stylized smoke shader they had made earlier in Godot and
just adjusted a few parameters to make it behave like fire.
The effect starts by scrolling a Voronoi noise texture across the particle mesh. As the UVs move, the flame keeps changing shape without needing different meshes or animations.
As the particle changes, the visible part of the mesh gets smaller. Loop_Box uses the particle's lifetime as the alpha cutoff.
The particle also changes color over time. A gradient texture controls the transition from almost white to orange and finally red.
The smoke effect uses the same shader. The main differences are a longer particle lifetime and a different color gradient that goes from red to black.
According to Loop_Box, that is the whole trick. The flamethrower reuses the same shader with a few tweaked parameters.
If you want to learn more, the links will be right below.
If you want to learn more about shaders in Godot,
The Godot Shaders Bible covers topics like stylized shading, screen-space VFX, lighting, and vertex manipulation through step-by-step examples.
It is a good starting point for developers who want to better understand
how shaders work and
improve the visuals of their games.