Uploaded March 2018 | Updated November 2026, 2 days ago
Last video we added support for wind to blow snow across our terrain. That was cool but the implementation was fixed and required us to have wind move in a specific direction. That's boring. In this video we're going to fix that by adding a "Wind Map". This will allow us to specify the wind direction and strength at any point on our terrain.
This allows us to add occlusion (say from a rock) or other complex simulations that make our snow more dynamic than it already was.
This change can be done by adding a sampler to our compute shader that accepts the new wind map and passing that map into the shader from our SnowSimulation script.
We'll also look at abstracting out the "texture position" in our compute shader so that the code is easier to read and requires less calculations.
Building a Unity Snow Shader playlist: youtube.com/playlist?list=PLEwYhelKHmig37twXTbU5ksXeEXmGjUsM
Still trying to get your head around Compute Shaders? Check out this intro to Compute Shaders that was recorded as I learned them myself: youtu.be/4Wh8GRrz7WA
Want to play with shaders in realtime? Shadertoy has you covered! This makes learning shaders and exploring what other people have made really easy. Check out a sample shader we made on Shadertoy here: youtu.be/Y2IADn-wAZM
Join the World of Zero Discord channel to discuss development of games and other software or to share your projects and get feedback: discord.gg/hU5Kq2u
Last video we added support for wind to blow snow across our terrain. That was cool but the implementation was fixed and required us to have wind move in a specific direction. That's boring. In this video we're going to fix that by adding a "Wind Map". This will allow us to specify the wind direction and strength at any point on our terrain.
This allows us to add occlusion (say from a rock) or other complex simulations that make our snow more dynamic than it already was.
This change can be done by adding a sampler to our compute shader that accepts the new wind map and passing that map into the shader from our SnowSimulation script.
We'll also look at abstracting out the "texture position" in our compute shader so that the code is easier to read and requires less calculations.
Building a Unity Snow Shader playlist: youtube.com/playlist?list=PLEwYhelKHmig37twXTbU5ksXeEXmGjUsM
Still trying to get your head around Compute Shaders? Check out this intro to Compute Shaders that was recorded as I learned them myself: youtu.be/4Wh8GRrz7WA
Want to play with shaders in realtime? Shadertoy has you covered! This makes learning shaders and exploring what other people have made really easy. Check out a sample shader we made on Shadertoy here: youtu.be/Y2IADn-wAZM
Join the World of Zero Discord channel to discuss development of games and other software or to share your projects and get feedback: discord.gg/hU5Kq2u






 that give you the ability to declare a using directive over every source file in your project instead of needing to duplicate the declaration inside of each file in your projects! This can help you reduce the duplicated code in your projects and make commonly used libraries and namespaces more readily available across your project!
To use a global using you can add `global` before your using statements like this statement you might use in a data serializing/deserializing library:
```csharp
global using Newtonsoft.Json
```
Including a global using will cause the compiler to include the namespace when resolving types across the entire compilation of your project instead of scoping that reference to the file the using is a part of. What this typically means is that you will want to use this for common namespaces used across your project and continue using file based using statements when referencing more feature specific types.
You can find more information about using Global Usings as part of the using directive documentation here: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-directive#global-modifier
Global Usings are also part of the `ImplicitUsings` feature you might see in your `.csproj` files. To learn more about this feature you can watch this video! https://youtu.be/NlvhBpLl0DY
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u
This videos thumbnail uses a globe SVG from here: https://commons.wikimedia.org/wiki/File:Emojione_BW_1F30E.svg Lets Explore Global Usings in C# 10](https://i.ytimg.com/vi/z4THCW3b16k/mqdefault.jpg)


