Add Snow to Vegetation
intermediate tasksGlobal Snow & Rain 3 · Common Tasks
Global Snow covers every opaque surface drawn in the deferred path. Grass blades and leaves stand almost vertical, so the slope rule keeps most of the snow off them, and plants drawn only in the forward pass, for example with translucency or Clear Coat, get no snow. This guide shows the option to use for each kind of plant.
Terrain Grass
- In the Coverage foldout, turn on Add Snow To Terrain Grass. It gives snow to the grass painted on Unity terrains: Grass Texture details and Detail Meshes in Grass mode without GPU Instancing.
- Stop and start the scene to see the change.
- Under Grass Coverage, set Coverage, the share of each grass blade buried in snow from its base (default 0.35), and Altitude Offset, a height added to Minimum Altitude for the terrain grass only.
The terrain grass follows its terrain, so it gets no snow when its terrain gets none. See Add Snow To Terrain Grass in Parameters.
Plants Placed as Objects
Use the Vegetation Layers for grass and plants placed as objects with their own shader, such as most grass and bush packs, whose plant meshes have normals that point sideways.
- Put the grass and plant objects on their own layers.
- In the Coverage foldout, select those layers in Vegetation Layers, below Add Snow To Terrain Grass.
- Set Slope Threshold (0.3 by default): lower values put snow on more upright leaves.
- Set Snow Height (0.15 m by default), the height of the snowy base of the plants over the ground.
The shaders of the plants stay as they are. The plants do not hide the ground from the snow, so the ground under them gets its snow. It costs one more draw of the objects on those layers per camera.
Shader Graph Plants
For plants with their own Shader Graph you can also use the Global Snow Vegetation node.
- Open the Shader Graph of the plant.
- Add the Global Snow Vegetation node, in the Global Snow category.
- Connect the color that goes to Base Color to its Color input, and its Out output to Base Color.
The node buries the base of the plant in snow and fades it toward the top, with the same Grass Coverage, Snow amount and Minimum Altitude as the terrain grass. It reads the height of each point from the first UV channel: V goes from 0 at the base of the plant to 1 at the top, as in most grass and plant textures. It works in deferred and in forward, and shows no snow while Global Snow is off.
For plants that use the URP Lit shader there is a ready made Shader Graph with the node already connected, so you only need to change the shader: select Global Snow > Lit Vegetation in the Shader menu of the material. It keeps these URP Lit textures and values: Base Map with its tiling and offset, Base Color, Alpha Cutoff, Normal Map, Smoothness and Metallic. It does not use the Metallic Map, Height Map, Occlusion Map, Emission or Detail Inputs, so if your plant needs them, add the node to a copy of your own Shader Graph instead. It clips by alpha and draws both faces, as grass and leaf materials need, and you can find it in Runtime/ShaderGraph.
For an example, drag the prefab Demo/DemoSources/Vegetation/Snowy Plants.prefab into a scene: its material uses the Lit Vegetation shader.
Trees Rendered in Forward
Some tree leaves use a shader that draws only in the forward pass, so they get no snow in the deferred path.
- In the Coverage foldout, turn on Add Snow To Forward Opaques. It adds snow to opaque objects whose shader draws only in the forward pass, with an extra pass after the opaque objects.
- Keep it off when you do not need it: it costs that pass on those pixels and, without SSAO, a depth and normals pass of those objects.
Trees placed as objects also block the snow below them. To keep the snow on the ground under them, see Trees Placed as Objects.
Next Steps
- Control Snow Placement - choose which surfaces get snow and what blocks it.
- Parameters - every Coverage option.
Suggest an improvement
Help us improve this documentation page.