Basically I am trying make a material for a grass mesh.
And I want to simulate the grass motion due to wind.
Instead of just using sine wave, I am trying to implement some rotational dynamic based motion.
This needs each grass to keep displacement vector and some velocity vector.
The current displacement and velocity are used to calculate the displacement and velocity in the next time step.
So I think I should use custom primitive data for storing the displacement and velocity, so that the material can use these data to calculate position offset.
And I want to update the data in each time step.
Is there a way that this can be done only in GPU.
The wind data is stored as a texture and can be read in GPU.
The next velocity and displacement of the grass is calculated from the world transformation of the grass, wind data, current velocity and current displacement.
So basically, I want to store some values as custom primitive data, and have a way to update the values within GPU whenever a frame is created.
In the end, I have decided to use Niagara.
And use Particle attributes(color and velocity) to store instance data, and make material graph to access those particle attributes.