2D flowing water

Hello everybody!
I need to make a 2d-water in my game. The water should flow in all ways: left, right, down. I don’t know how can I get that. I think I can make a static block water like a 2D Procedural Water System With Buoyancy and streams for left or for right. They should be a river with a spline. Please, look at the picture.


I know: this is looking terrible.
Any help is welcome!
Thank you.

Google for:

  • HLSL water shader tutorial watch it
  • Shadertoy - find shader you like
  • google for Unreal 5 tutorial creating HLSL shader

Try to make it all yourself

If this does not work, get ChatGPT and copy paste your shader and ask what is wrong with it, how to modify to use in unreal.

Thank you Nawrot!
I will try.
By the way any other advice?

I need to make a water like in Terraria game. I don’t know how to emulate physics effect. Rendering is a second part.

There’s a plugin in engine called Niagara Fluids, I believe it has 2D Fluid Simulation available.


There's also Marketplace assets like Fluid Ninja
1 Like

If its just a 2d sheet you dont really need much.
Look up what flowmaps are.
Make a material that uses them.

1 Like

Thank you, guys, for your answers.
@Extrone, I’m trying to dig FluidNinja LIVE. This is a very big and complex thing.
@MostHost_LA , I don’t sure to use flowmaps to get this effect, because I need a water runs away from top to bottom. Or am I wong?

You can design the flow to go whatever way you want. Look it up.

There is something new (well not that new).

Thing called SDF:

Really great idea for using in shaders. UIMaterialLab shows how to use them, it has most of required functions ready to use.

It is possible to make shader that does soft merging of shapes (so it looks like water edge in 2d).

Only one problem i see is setting up (passing to shader) array of points to distribute SDF shapes.