I'm trying to make cellular automata water wherein water tiles flow down and to the side if there is free area. I'm stuggling to find out how to do this without creating new nodes.
In my current project I'm trying to do an infinite 2d world like terraria. I have the map and chunk saving done. I'm saving the chunks as scene resources.
I now want to add water. I want to use cellular automata wherein the water flows down and to the side if there are free spots. What's the best way to do this?
I'm thinking one strategy may be to use a shader where the shader reduces the vertical size and color as water density variable decreases. Is it possible to pass in variables through script to a particular cell's shader code?