
Godot opti voxel V2 (GPU)
Hey everyone! About a month ago, I posted on this sub to share the very first version of my Godot voxel library:
https://www.reddit.com/r/VoxelGameDev/comments/1spww15/yet_another_voxel_library_on_godot/
Since then, I've continued working on it here: https://github.com/aobayama-gaming/opti-voxel
Today, I just wanted to share a new milestone: I've ported my mesher over to the GPU! (I'm currently using an optimized Surface Nets implementation). To do this, I used native Godot capabilities, specifically GDExtension and hacking my way through the RenderingServer and compute shaders.
I'm still experiencing some stutter, and I'm not entirely happy with the CPU-GPU data transfer overhead (even though I'm using highly compressed datatypes).
The short video I'm sharing tonight shows the mesher pushed to its absolute limits (using 5GB of VRAM and processing batches of 1024 chunks) generating mountains and caverns.
I hope looking at my code helps some of you wrap your heads around Godot's compute shader pipeline and memory passing, which can be pretty confusing and poorly documented!