top of page

Snow Shader Part 1

For my next piece of work I am attempting to gain experience working with shaders by creating a shader that will represent snow accumulating on an object and changing the colour and shape to reflect that.

To assist me in this process I used the unity extension ShaderForge which allows node based coding of shaders. My exact set up can be seen below however there were a few more important parts of the set up.

I used three different textures throughout the process, two of which i passed in myself. These were a basic brick texture which represents the normal look of the object, and a snow texture which is what i want the object to look like as the snow level increases. I will lerp between displaying the brick texture or the snow texture based on a value which will be stored in a third texture which I will create at runtime. I am doing this because it will allow me to change accurate points on the texture in reference to particle collisions from snow fall.

In addition to these things you can also see that I am using the normal direction and the dot product to attempt to determine the area of the object that is being hit by the incoming snow. I am also using a slider value called "SnowAccumulationLevel" to determine just how far out the snow can go, however at higher value it starts to look like a deformed rock more than just addition of snow.

While this set up is not perfect and clearly has some pieces that need to be cleaned up, I believe it will provide the effect i am looking for at this stage.


Recent Posts
bottom of page