We have trees and grass that sway in the wind via our Shader Graphs. We displace the vertex position to give the grass, branches and leaves motion.
Will this kind of motion be taken into account when motion vectors are updated? Or would it simply skip the object because the transform hasn’t moved, and even if the transform moved, it would write motion vectors only based on the movement of the object as a whole? (I’m using per-object motion in this case).
In that case - I wonder about the units / space / etc for this custom motion vector (I haven’t checked the documentation yet). Also, this will require that I track state between frames - for example how far did the wind move the vertex in this frame, vs. the previous frame… so any ideas how to feed this per-vertex type state into a shader?
EDIT: actually scrap the question about the state. I would just need a duplicate set of the same wind parameters from the previous frame, then calculate two vertex offsets to figure out the difference.
Here’s what the documentation says. I’m guessing this is the offset between the current local position and the previous local position? Or is this in some other space coordinates?