Snow Track Shader

While playing Gears 5 I got pretty bored at the open world ice level in act 2. While being really bored I started to look around at the world and noticed all of the technical details that made the world come alive. One thing that caught my eye right away was the snow tracks in the terrain. So I decided to try and recreate it.

The basics of the system is two parts: one shader writes to a SnowMap texture while the other shader is a vert/frag shader which displaces the verts based on the SnapMap while the frag shader lerps between a snow texture and a ground texture.

The map creating shader just paints to the textures at a specific UV. The easiest way to get the UV is to either raycast against the mesh or get the UV from a collision (of course it could always be calculated from local / world space but I didn’t need it currently.) Once the snow map texture is updated it is passed to the track shader to manipulate the mesh.

At the current time I haven’t open sourced this project yet but if you’re interested in a tutorial or the source code let me know.

Todo

  • Post pictures on blog
  • Release source?
  • Make the code more dynamic for different types of collisions
  • Shader optimizations?