In a Unity game I have an object whose mesh is made of around 10k vertices and I have to make changes to these vertices (position, color, etc) almost every frame.
Considering that such object is always visible to the main camera, I was wondering if there is a way for me to keep the whole mesh in the GPU and do the changes to its vertices there with a Compute Shader.
I know how to use Compute Shaders. What I can't find out is how should I, in Unity, keep a mesh entirely in the GPU. I could use 3 StructuredBuffers, 1 for the vertices, 1 for the vertex-colors and 1 for the UVs of the mesh. However, that is not enough to properly form the mesh in the GPU (it means, with only those I would be displaying just the vertices on scree as in a point-mesh, not exactly the triangles of the mesh).
Is there a way I could achieve such a thing? If so, I would highly appreciate a short example in pseudo-code to point me in the right direction.