I'm working on terrain generation using marching cubes. As of now I'm able to generate the terrain vertices in a compute shader but I can't figure out how to draw the mesh without reading the vertices back to the cpu and assigning them to a new mesh object. the marching cubes compute shader output is an AppendStructuredBuffer where the vertices are set up so every 3 consecutive vertices in the buffer makes one triangle.
output is an append buffer of triangles:
struct Triangle { float3 a, b, c; };
AppendStructuredBuffer<Triangle> triangles;
I've looked at Graphics.DrawProcedural but it looks like I need to write a custom shader for that which would take in the compute buffers and draw from them but idk how to make that work since I only have access to shadergraph in urp. Mesh.SetVertexBufferData seemed promising but it won't take a pointer to a compute buffer on the gpu, only C# arrays and lists which it then sends over.