Thanks for that link. I wouldn’t have found that documentation with all the search terms I was trying. Truly appreciate it. I feel good knowing I’ve taken a step in the right direction.
Sadly, that page doesn’t explain how **MaterialParameterCollection **uses the collected parameters to make the grass move away from the player.
I understand that the global position of the player is being fed to a shader on the foliage, and then the foliage reacts accordingly. At the same time, I do not understand it. Specifically, I don’t understand how or why the problem is solved using global data. Why (and how) is this a global parameters problem?
My confusion arises from my mental image of the problem: I see it as an issue between the character model and the foliage. And I see the solution as being between the model and the foliage. For example, simply have a wind-like shader on the foliage that reacts to contact with the player/any rigid mesh model collision. The wind effect area would only be a very small area surrounding the player model.
I can’t grasp the concept of a global parameter taking care of what seems to be a very “local” problem. I don’t understand how I would set up the **MaterialParameterCollection **to make a certain shader on the all the game world’s foliage bend away from the player. Is it the wind shader briefly blowing the grass away from the player?
Is it: The **MaterialParameterCollection **tells the grass a single, small gust of wind is occuring, because the player’s global location is XYZ? What parameterized shader is this “global parameters god” telling a blade of grass to use at that moment the player is touching it? How is this “god” aware that only those few blades of grass in location XYZ should move at the moment?
I picture the player model telling the grass " You move because I am at location XYZ". I don’t know how the **MaterialParameterCollection **god solves it by looking at the entire game world, then applying a bend shader to certain foliage at that very specific moment of player/foliage contact at location XYZ. And what shader is it?
A “global view/solution” seems more complex to me, but obviously it works and apparently simply because that documentation mentions it.
(Sorry I’m rambling. This probably started to make less and less sense as I kept writing. I am not articulate, that’s for sure)