If I have thousand of objects using the same shader and I need to pass in Global variables into that shader to do some rendering.
What is the best way to keep those parameters up to date. I don’t see looping through all objects to update the parameter? I assume there is a better way.
I need to pass in a height map that is static, so I can do that once when the object is created.
But that height map has 2 variables that change all the time, I need to keep those parameters up to date on thousand of objects.
What is the best practice for that?
One is an integer and other is a float.
I’m using the height map for snow accumulation on any surface that is facing up. Those values tells how much snow has fallen, so I compare against height map to determine if I alter the color to snow color or not.
Thanks,