We made use of multiple shaders—for example, we have separate shaders for grass and tree foliage. The
grass uses a more simplified shader compared to the trees. It relies on standard vertex offsetting,
where we offset the vertices and their textures based on Perlin noise.
The tree shader, however, uses a gradient to control how much movement or offset is allowed.
Technically, the grass shader also uses a form of gradient, but it's based on the UV map rather than
a definable gradient—making it more static. In contrast, the tree and leaf shaders use a
configurable gradient to mimic more natural movement. For example, the base of a tree doesn't move
as much as its branches, and the gradient helps replicate this effect.
We chose to use a simplified version for the grass since the visual difference is fairly minimal.
Unlike trees, where the movement can vary greatly based on height, grass sways more uniformly. If
you look closely at the video above, you'll see that the branches sway much more than the tree base,
accurately mimicking natural motion.
Below, you can find a snippet of our Shader Graph setup.