Рет қаралды 1,181
A lot of nice effects can be done with the new feature in Godot 4.4. that allows you to copy the state of the mesh animation from the GPU. This project was a custom job I did, based on an example in Unreal Engine.
Unreal Engine is several steps ahead of Godot in this regard. Complex 3D effects on the GPU are UE's specialty, and it has very powerful tools to achieve them. But it is now possible to recreate some of them in Godot in a rudimentary way. And I think if I use a compute shader next time this is will be a lot faster.
I know, I know, calculate 5k vertices on the CPU is quite slow.
--- UPDATE:
My new friend DeepSeek guided me to get the full array of vertices in one step using the local transformation. Now the effect is faster even on the CPU.
The above also means that the remaining two cycles, to make the interpolation and write the texture can be done in a compute shader, so I guess there would be no bottleneck for this or any other effect. I think it would be as fast as UE, but I have to check.
---
DOWNLOAD PROJECT FILE (PATREON SUPPORTERS)
/ smear-effect-4-4-12092...