โ† All examples

godot shaders

Drifting snowfall overlay

Overlay falling snow: flakes in three depth layers fall at different speeds, sway sideways on sine paths, vary in size and soften with distance, drawn on a transparent rectangle over the scene.

Recorded render of Drifting snowfall overlay

What this component contains

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

How it works

Shader type
canvas_item
Parameters
snow_color (vec4 = 1, 1, 1, 0.9), density (float = 0.55), fall_speed (float = 0.15), sway (float = 0.35), wind (float = 0.1), flake_scale (float = 14), aspect (float = 1)
Use it on
A ColorRect above the scene covering the area that should show snow.
Result
A city scene behind white snowflakes of three sizes drifting down.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/snow_flakes_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

Flakes are soft discs, not crystal shapes. Each flake is confined to its cell, so very large sway values clip at cell borders.