This is pretty trivial. You need to be able to tell each vertex what its pivot is. This can be done easily with baked vertex color data.
Then, you take the difference between the pivot and the absolute world position of the vertex. This will give you a vector that can scale the mesh into and away from its pivot point.
Control the offset along the vector by using the depth buffer, or by comparing the distance from the vertex position and the camera position.
2 Likes