
Ice and Snow Shader
Showcase:
Vertex Painting Mode:
Vertex Normal Mode:
The Goal:
An efficient function to add an ice-and-snow coating on top of mesh materials
The Solution:
Using vertex color and vertex normal to create customizable masks
Setting Up Vertex Color and Base Texture Input
I decided to create a material function to maximize the customizability so that the users could put this material function on top of any texture input.

Ice Layer (Red Channel):
For the look of ice freezing on top of base material, I lerp darkened base color of the texture, a new value for the roughness of the ice, and a subtle normal map with the texture inputs.

Height Lerp Setup:
For the snow to not only sit on top of the base material but also spread in the deeper areas, I used the base material's ambient occlusion map, blending with a noise map to create a height map with the powdery snow texture.


Adding Snow (Green Channel):
To give the snow material a sense of depth, I used a height map to drive the bump offset node. With the lerp node, it's the same process to blend the ice layer with the snow layer.

Transitioning Between Ice and Snow (Blue Channel):
To soften the transition between ice and snow for a more natural look, I created another blending layer for the user to vertex paint.

Vertex Normal Blending Option:
For the users to be able to use this function on 3D assets, I offered vertex normal options of the ice and snow blending with the base material, using a world position gradient mask facing Z axis.


Connect Everything in Base Material!
With full control of the parameters to adjust the look of layer blending, we are ready to paint!

Graph Overview:

Resource:
Snow and concrete tile textures are downloaded from Fab.com