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.