Feeding vertex data to a compute shader I'm writing a CAD program in vulkan. In my current design, I have line paths represented as large vertex buffers for rendering. I would like to implement an algorithm for extruding the path outwards, based off of cross products. Ideally I would like to implement this algorithm within a compute shader, using the vertex buffer in place of a storage buffer. The algorithm would work like this: for each vertex in original path, calculate cross product based off of the two surrounding vertices in the buffer, then normalize and multiply by a scalar.

I'm fairly certain that this could be done by copying the vertex buffer to a storage buffer temporarily, but I doubt that's optimal, unless it's not actually physically copied. I don't see why I should move large chunks of data from VRAM to VRAM like that. It would probably, be faster to implement this algorithm locally on the CPU in that case. I don't have much experience using compute shaders; any input is appreciated.
You will need a new chunk of memory for the new surface anyway, so why not read from the original and store directly in the result.

Having precomputed normals will reduce a lot of the computation requirements though (especially needing to find&amp;read each neighbour), the user action of the extrusion will probably be interactive so you will have multiple frames with different extrusion amounts but the normals of the original surface won't change. Having the normals be around will likely be helpful for other operations as well. You could make the temporary transformed geometry just a vertex shader trick as well and only commit the result once needed.

Computing normals is much simpler by going face per face and then summing the the non-normalized normals per vertex and normalizing after.