โ† All examples

godot shaders

Layered rain streaks overlay

Overlay falling rain on any 2D scene: three layers of slanted streaks at different speeds, lengths and opacities for depth, drawn as a transparent rectangle over the content.

Recorded render of Layered rain streaks overlay

What this component contains

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

How it works

Shader type
canvas_item
Parameters
rain_color (vec4 = 0.75, 0.82, 0.95, 0.55), density (float = 0.5), speed (float = 1.6), slant (float = 0.25), streak_length (float = 0.12), columns (float = 90), aspect (float = 1)
Use it on
A ColorRect above the scene covering the area that should show rain.
Result
A city scene behind fine slanted streaks of rain in three depths.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/rain_streaks_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

Streaks pass in front of everything in the rectangle; there are no splashes (see `particles_rain_splash`). Set `aspect` to the rectangle's width over height.