Convert MIT 4.3 water shader to 4.4. Godot migration doc not complete because it is not mentioned why the shader looks completely different in 4.4. One or more differences between Godot 4.3 and 4.4 are not recorded in the migration docs.
Does someone know what changed between 4.3 and 4.4 to make this shader work properly?
I looked up all the methods that changed, but they are not present. Also res changed to uid, those code lines I changed all to uid. But that is ofcourse not the problem. The water waves changed to long strokes instead of short seperate waves.
If you share code, please wrap it inside three backticks or replace the code in the next block:
hihihi. eh I am just a greenhorn in Godot trying to make a 3D game. I have no knowledge of any high level things. I am innocent. The MIT project indeed loads imgui.
Theres another fork with buoyancy that says 4.3 only because of async GPU readback ???
I dont even use that anyway. I assume its 4.3 only because of how the height data is transferred back from GPU for the buoyancy calculation. Maybe the data readback is different in 4.5/6/7 now.
Hey, I looked and tried some things. Visual observation, combined with looking through the code a bit where the problem could be. In the UI I changed the Cascade tile length to 1 and then to 10, the waves are all straight. Somehow the code or code pieces for the tile is processed differently.
In the Godot 4.3 the tile are very wavy.
My knowledge is limited, but any pointers to Godot advanced shader learning?
Thank you, that means I can just open it with any text basec editor and have a go.
Oh my, what an adventure. Is like starting a fight with Arnold Schwarzenegger in it’s prime years and say: I will get ya! Let’s fight.
I saw the version from someone else, it has the same problem, the waves are uctually straight.
The way this ocean is created is like a focus point in the horizon with many lines towards the viewer, then the lines have a certain wave pattern.
I am cross posting this also in Reddit Godot. Maybe someone can help me also with learning Godot shaders and GLSL. And maybe some day I can solve this. I am open for suggestions if you know a place to learn. If possible free, if not paying some money is also ok.
In my previous post #5, the difference is the wave pattern. In 4.3 is it very oscillating? In 4.4 it is more like a shallow curve. I am reading through some posts.
And in the code of the water shader I see they used the keyword: hint_normal
Hint_normal is used by the shader to extract the red and blue channel from the texture, then use it as a normal. But since the normal in version 4.3 has an error. It is possible that it is related?