GraphicsBuffer
The previous frame's deformed vertex buffer. If no previous-frame buffer exists, returns the current frame's buffer. If Unity hasn't deformed the mesh yet, returns null.
Retrieves direct access to this renderer's deformed vertex data from the previous frame.
Use this method to retrieve the deformed vertex buffer from the previous frame. Deformed vertex data is the vertex data after Unity applies skinning and blend shapes. Use GetVertexBuffer to access the current frame's deformed vertices.
A previous-frame buffer is available only when skinnedMotionVectors is enabled and Unity is rendering motion vectors. Unity renders motion vectors while at least one enabled Camera has DepthTextureMode.MotionVectors set. Render pipelines typically set this mode when they render a motion vector pass for an effect such as motion blur or temporal anti-aliasing.
While rendering motion vectors, Unity alternates between two GPU vertex buffers that store the deformed vertex data for the current and previous frames. If Unity isn't rendering motion vectors, or if double buffering has only just started and no previous-frame data is available yet, this method returns the same buffer as GetVertexBuffer. If Unity hasn't deformed the mesh yet, no vertex buffer exists and this method returns null.
If the buffer has a target that allows compute access, such as GraphicsBuffer.Target.Raw or GraphicsBuffer.Target.Structured, you can use it to access the previous frame's deformed vertex data in a ComputeShader or another shader. When Unity deforms the mesh on the GPU, the buffer already has such a target; otherwise, request one with vertexBufferTarget or EditorGraphicsSettings.defaultMeshBufferTarget. Bind the buffer as a shader parameter by using ComputeShader.SetBuffer, Material.SetBuffer, or a similar method.
Additional resources: vertexBufferTarget, GetVertexBuffer, skinnedMotionVectors.