โ† All examples

godot shaders

2D flame with rising turbulence

Draw a flickering flame in a rectangle: distorted fractal noise rising over time, shaped by a tapering mask, coloured through a four-step heat ramp with transparency outside the flame.

Recorded render of 2D flame with rising turbulence

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • component.json
  • demo.tscn
  • fire_flame_2d.gdshader
  • inspect_shader.py
  • material.tres
  • preview.png
  • test_package.py
  • verification/native.json

How it works

Shader type
canvas_item
Parameters
core_color (vec4 = 1, 0.97, 0.75, 1), inner_color (vec4 = 1, 0.75, 0.2, 1), outer_color (vec4 = 0.95, 0.3, 0.05, 1), smoke_color (vec4 = 0.3, 0.05, 0.02, 1), rise_speed (float = 1.8), turbulence (float = 0.4), base_width (float = 0.5), height (float = 0.85) and 1 more
Use it on
A ColorRect (or any CanvasItem) sized to the area to fill; UVs span 0 to 1 across it.
Result
A tall flickering flame with a pale core, yellow and orange body and dark red tips.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/fire_flame_2d/

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • contract_static
  • engine_run
  • engine_log_clean
  • shader_in_scene
  • capture_written
  • render_not_uniform
  • shader_changes_pixels

Limits to consider

Flat 2D effect with no light emission; add a PointLight2D to light the scene. The shape is symmetric on average, so very wide flames look like a column.