Wind on Grass and Trees in Unity URP
Wind on a mesh is done in the vertex shader. Each vertex is pushed sideways by an amount that grows with its height, so the base stays planted and the tips move. The amount comes from a noise that scrolls across the world, which keeps two plants a few metres apart out of step and lets a gust visibly cross a field.

How vertex wind works
Section titled “How vertex wind works”Three parts, in any wind shader:
- A mask that says how much each vertex may move. The usual one is height in the mesh’s own space: 0 at the base, 1 at the top. Painted vertex colours are the other common mask, for leaves that flutter on a trunk that holds still.
- A wind value that changes over time and place: a sine wave, or better, a noise texture sampled at the vertex’s world position and scrolled.
- A direction, one for the whole scene or one per axis.
The vertex moves by mask × wind × strength along the direction. Nothing about it needs a physics engine or a script per plant, which is why a whole forest can sway for the cost of a few lines in the vertex shader.
Wind by hand in Shader Graph
Section titled “Wind by hand in Shader Graph”In a Lit or Unlit graph, in the Vertex stage:
- Position in Object space, its Y (the G of a Split) through a Remap from your base and top height, a Height Range property, to 0 and 1, then a Saturate: the height mask.
- Position in World space, X and Z, divided by a size, plus Time times a speed: the noise coordinates. A Simple Noise or Gradient Noise at those coordinates, with the noise node’s Scale set to 1 so that Size alone decides how far apart the gusts are, minus 0.5 so it pushes both ways: the wind value. Left at Simple Noise’s default Scale of 500, the wind changes every few millimetres.
- A second noise at the same coordinates plus an offset (17, 9 here) for Z. The two winds into the X and Z of a Vector 3, its Y at 0 so nothing moves up or down; that times the mask times a Strength property, added to the object space Position, into the Vertex stage’s Position.

If the grass is single planes, set Render Face to Both in the Graph Inspector. Keep the strength small: the vertices move, the normals do not, so a strong bend shades like a straight blade.

What a Wind Zone moves
Section titled “What a Wind Zone moves”Unity’s Wind Zone component moves trees made with Unity’s Tree Creator or with SpeedTree, through their own shaders, and the Particle System’s External Forces module. It does nothing to a plain mesh with a URP Lit material, or to grass made in a modelling program. For those, the wind has to be in the material’s shader, as above or as below.
With All In 1 3D Shader’s Wind
Section titled “With All In 1 3D Shader’s Wind”Don’t own it yet? → Get it on the Unity Asset Store
Two parts: the Wind effect on each material that should move, and one Wind Controller in the scene that sets the wind for all of them at once.
The Wind Controller. Add it to any active GameObject and give it a Wind Noise texture. It starts empty, and without one the plants do not sway: in our test they leaned over to one side and stayed there. The demo’s is Demo/Textures/Wind_NoiseDemo.tif. Its fields, all explained on Wind Effect and Wind Controller:
- Wind Force, 0 to 3, 1 by default: the overall strength.
- Noise Speed, how fast the noise scrolls: the speed of the gusts.
- World Size, 50 by default: how many metres one repeat of the noise covers. Plants much closer together than that move nearly together, and a gust is a wave across the field; lower it for more variety between neighbours.
- Bidirectional Wind: on, the wind pushes both ways and plants swing; off, it only pushes one way and plants lean.
- Use Wind Dir: on, the wind blows along the controller’s forward direction; off, it moves vertices on X and Z. It never moves them up or down.

The controller sends its values to every material each frame, so changing Wind Force from a script, for a storm, changes the whole scene.
The Wind effect, in the material’s Mesh Effects:
- Attenuation, 0 to 1: this material’s share of the wind. Grass at 1 and tree trunks at 0.2 under the same controller is the usual set up.
- Use Vertical Mask?, with Min Y and Max Y: the height mask, in the mesh’s own space. A vertex at Min Y does not move, one at Max Y moves fully, and one above Max Y moves even more. Below Min Y, version 2.8 keeps going the other way, so those vertices move opposite to the wind; from 2.81 they stay still.
The defaults are -1 and 1. A blade of grass whose base sits at height 0 still moves at its base with those, so set Min Y to the base: the demo’s grass preset, MAT_Grass, uses 0 and 1.

Recalculate Normals, in the same Mesh Effects, makes the lighting follow the bend: it runs the wind again on two points next to each vertex and builds the normal from where they landed. It costs more in the vertex shader, and on thin grass it is rarely noticed; on a big tree whose crown leans far, it is.
Grass, bushes and trees
Section titled “Grass, bushes and trees”The settings that change from one kind of plant to the next:
- Grass: Min Y at the base, Max Y at the tip, Attenuation 1. Grass is short, so a lower World Size gives each clump its own sway.
- Bushes: Min Y a little above the ground, so the stems near the soil hold, and Attenuation around half.
- Trees: leave Wind off on the trunk’s material, so the wood never moves, and turn it on in the leaves’ material only, with Min Y at the bottom of the canopy and Max Y at its top: the leaves where they meet the trunk hold, and the top of the crown moves most. A low Attenuation, around 0.25 against grass at 1, keeps a big tree from swaying like a reed. Keep World Size large, around 50, so the whole crown reads nearly one value of the noise, and Noise Speed low for slow gusts. For a tree that is one mesh with one material, 2.81 holds everything below Min Y still, so Min Y at the top of the trunk keeps the trunk from moving; in 2.8 everything below Min Y moves the opposite way, so give the trunk its own material.

The mask is a straight line from Min Y to Max Y. For leaves that flutter faster than the branch they hang on, give the leaves their own material and mesh, with more Attenuation than the trunk.
Terrain
Section titled “Terrain”The 3D Shader does not support Unity’s Terrain component, so trees and details painted with the Terrain tools do not take its materials or its wind. Place the plants as ordinary GameObjects, or with a scattering tool that places GameObjects, and the wind works on them; or keep Terrain’s own grass and its Wind Zone for the painted parts.
What it does not do
Section titled “What it does not do”- Move vertices up or down. The wind pushes sideways only, so a blade bends by leaning, not by shortening.
- Work on Terrain trees and details.
- Push plants away from the player. The wind comes from the noise and the controller only; there is no input for a character walking through.
