Looking for a Rain pixel Shader / 2d filtrer

Hello, there’s out there any 2d filter for UPBGE/Range that creates rain effects ?

Hi,
I hope you find better ones.
But I took this opportunity to try to find the way to port a shader of a Godot shader Tutorial series by FencerDevLog

This was the tutorial

Here’s the code for Blender 2.79 (so it’s compatible for UPBGE 0.2.5 and Range 1.6):
rain.glsl (905 Bytes)

Here’s the .blend
279_Filter2D_rain.blend (462.8 KB)

It may not be the best rain, but it shows a way to port other’s Tutorials to bge…

Excellent ! Nice and lightweight just as we like in Upbge/Range

Btw, for making it less harsh, just have to cut the added value

gl_FragColor += color/4

This is also nice:

        gl_FragColor *= 1.0-color/2;
        gl_FragColor += color/4;

Now here’s also snow.

I ported this shadertoy glsl.
“Just snow”
https://www.shadertoy.com/view/ldsGDn


279_Filter2D_snow.blend (464.5 KB)

Very nice ! I hadn’t test / look that snow glsl yet but you should merge it with the rain one and create a paramater to transit smoothly from rain drop to snow flake :wink:

I would so much to work on 2d shaders too but don’t really have time nor time to learn

Other idea of screen-space weather :

  • strong heat / wet jungle : that wavy mirage effect … just some blur ?
  • strong winds: don’t know how it could work… maybe just blast of dust ?
  • storm thunders : make 1 side of the object’s normals getting suddenly very brighter

A complete weather 2d screenspace glsl would be terrific if there’s some stuff that can be re-used. As long as it remains lightweight

Since both filters use the property “threshold” here’s a simple blending between the 2 filters running separately on different pass numbers.

Just a low effort hack :wink:


279_Filter2D_rain_and_snow.blend (491.4 KB)

I don’t have any game I could use it anyway since whole effect only looks good on a static camera.