Screen Space Multi-Colored Fog - Unity Shader

June 4, 2018
5m
Unity 3DTech ArtShaders

Screen Space Multi-Colored Fog

This is how the shader will end up looking :

screen space colored fog

This shader is completely an image effect hence the title - 'Screen Space'. This method allows a great deal of control on how the fog will be rendered. The main concept explored here is the use of the 'Depth Texture' which is basically the value of the distance of a pixel from the camera.

The concept of a 'Depth Texture' is also needed to implement effects like SSAO, Soft Particles, Translucency and many more.
Here is the colour ramp used :