I use the vertexShader in WebGL2 to change vertex positions. Since the vertexShader is specifically designed for vertex calculations, as its name suggests, it is ideal for this.
Shaders are all executed by the gpu (vertexShader, fragmentShader, computeShader).
The vertexShader has direct access to the geometry attributes (position, normal, uv, custom geometry attributes)
Caring about vertices is the very nature of the vertex shader and there is nothing more appropriate than manipulating vertex positions directly.
The fragment shader is only executed after the vertex shader has been run through for all vertices, because only then are the necessary positions, normals, uvs of each vertex available to the fragment shader in order to be able to linearly interpolate the positions, normals, uvs between the vertices in order to be able to calculate the pixel color.
Since the VertexShader and the FragmentShader are very specialized shaders in order to be able to achieve the best possible performance in their area of responsibility, they are not optimal for general calculation purposes.
I understand the node system in such a way:
shader functions assigned to
"material.positionNode = " are interpreted as vertex shaders
shader functions assigned to
"material.colorNode = " are interpreted as fragment shaders.
Using compute shaders for manipulating vertex positions does not seem appropriate to me, because in the end you would have to transfer your values to the vertex shader anyway.
The compute shader is an unspecialized shader. So it can be used for all sorts of calculations in the gpu. The computeShader can’t do what vertexShader and fragmentShader do any better! It is simply better suited for all other purposes.
E.g. calculate textures or calculate a swarm of particles as in the compute examples.
For me it is very valuable for displacementTexture calculations. I can then use these textures in vertex shaders for vertex shifts.