Godot Version
4.5.1
Question
I’m trying to get my marching cubes working without any GPU readback in Godot, and I’m very close. At the moment, I have successfully generated triangles and an indirect args buffer for the RenderingDevice.DrawListDrawIndirect call. I’ve been able to render a triangle using RenderingDevice.DrawListDrawIndirect, this used buffers with dummy triangle data put into a buffer using a rendering device obtained through RenderingServer.GetRenderingDevice.
The issue is, the compute shader that generates the triangles uses buffers created by RenderingServer.CreateLocalRenderingDevice. If I try to use the uniform set for the vertex buffer when trying to render, it just doesn’t work. I’m 99% sure it is because RenderingDevice can’t share RID’s with each other since they track them individually. I could probably use RenderingServer.BufferCopy, but that is obviously not ideal.
Is there a way of sharing a buffer between rendering devices so I can render the compute shader triangles?