Hello all, I'm new to godot and shader, but have already some experience in programming (as a physicist, not a real programmer đ). I wanted to learn a about shaders and fluid simulation, and it seemed coherent to combine those to obtain super detailed air flow using a Lattice Boltzmann Simulation link_to_tuto.
In this algorithm, one need 9 grids of values of microscopic velocities, and 3 more for the macro parameters (density, velocity). So I encode them using 3 textures in their rgba values. And using shaders, I try to implement the algorithm.
However, as I am new to shaders and godot, I have a really hard time debbugging what I've created. It seems to almost work, but not quiet, and after rewriting everything 10 times, I just can't see where I hid my mistake(s)...
I was wondering if some of you were interested by this enough to give a hand? I put my code on github here: https://github.com/LeoBosse/Godot_Fluid
For credit, I've found an existing fluid simulation in godot here, but couldn't understand how it worked and how to reproduce it. So I went my way to learn a maximum.
All the shader physic is under the Air node, with each viewport corresponding to different physical quantities. When running the project, you can cycle through viewports using the spacebar. The idea was to have a 2d plateformer in the foreground, and the air flow as a background. This is why you can move the godot logo with the arrow keys, and there is a world node with a player and a autotilemap.
I know this is a very specific question that requires a lot of implication a potential helper, but I can always dream đ I'll be happy to discuss with you on the subject. And of course, if we make something working properly (and it's of interest to somebody), I'll keep it freely available.
Thanks in advance to anyone crazy enough to answer that!
Léo