Baltor Get started

Gallery / Godot shaders

Rain on a window with running drops

In your harnessGodot shaderMIT

Window pane covered in rain: static droplets of random size scattered in cells, drops that run down with trails, each drop refracting a sharp upside-down view while the glass between them shows a blurred, misted scene.

Render of Rain on a window with running drops
The render its check recorded in Godot 4.7.2, 256 by 256 pixels.

What it takes and gives

Shader type
spatial
Render modes
unshaded, cull_disabled, depth_draw_never, shadows_disabled
Parameters
screen_texture (sampler2D), drop_density (float = 12), drop_size (float = 0.28), runner_columns (float = 7), runner_speed (float = 0.35), refraction (float = 0.06), mist_blur (float = 3), mist_tint (vec4 = 0.82, 0.87, 0.92, 1) and 1 more
Use it on
A quad (the pane) in front of the scene, with UV v pointing down the glass.
Result
A misty pane with clear beads of water showing sharp, bent bits of the scene, and drops sliding down.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/rain_glass_droplets/

Limits. Screen-space refraction cannot show what is off screen and does not invert the view like a real lens. Drops do not merge or interact; runners can pass through static drops. The mist blur depends on the screen texture's mipmaps.

Details

Kind
Godot shader
Engine
Godot 4.3 or later
Files
11 files, 71.0 KB
Licence
MIT
Declared effects
reads files, runs commands
Checked with
Godot 4.7.2, opengl3 compatibility (Mesa llvmpipe, Xvfb)
Checks
contract static, engine run, engine log clean, shader in scene, capture written, render not uniform, shader changes pixels
Techniques
Hashed cellular droplet placement, Screen texture refraction with mip-level blur, Column-based running drops with trails, MurmurHash3 32-bit finalizer over prime-combined lattice coordinates as a hash
Tags
godot shader, spatial, rain, glass, droplets, refraction, window
Identity
library.supply.creative_originals.168f05bc52797616041b2e70.f9721756339c1023
Version
f9721756339c1023cce55c9d34d9fb2eac5cea2f2a88f88cfe613f42fd4b2070

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.