Uploaded December 2022 | Updated November 2026, 3 hours ago
Grab a controller and brush off your C# skills - we're building a game this week! Over the next 3 days (Tuesday - Thursday 11-3 Pacific) we'll be diving into Unity and building a game that we can connect up to the cloud to explore building cloud connected games.
This stream is also available on the Microsoft Developer and Microsoft Reactor Channels:
Microsoft Developer: twitch.tv/microsoftdeveloper
Microsoft Reactor: @MicrosoftReactor
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
Grab a controller and brush off your C# skills - we're building a game this week! Over the next 3 days (Tuesday - Thursday 11-3 Pacific) we'll be diving into Unity and building a game that we can connect up to the cloud to explore building cloud connected games.
This stream is also available on the Microsoft Developer and Microsoft Reactor Channels:
Microsoft Developer: twitch.tv/microsoftdeveloper
Microsoft Reactor: @MicrosoftReactor
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
![Adding an Accent to our Contrast Shader - Lets Make a Side Scrolling Shooter - Part 4
Lets spice up our our contrasting transition shader with an accent color that more clearly marks the border between one color and the next.
Part 1 of building this contrasting shader is here: https://www.youtube.com/watch?v=jJcSbixSy5c
Most of the magic of this shader happens in these lines which select the color we want to draw:
```
float maskPrimary = (_Transition + barrierSize [LESS THAN] maskStrength);
float maskSecondary = (_Transition - barrierSize [GREATER THAN] maskStrength);
float maskAccent = !(maskPrimary || maskSecondary);
o.Albedo = maskPrimary * _PrimaryColor
+ maskSecondary * _SecondaryColor
+ maskAccent * _AccentColor;
```
Come join the World of Zero Discord channel to talk software, game development and more: https://discord.gg/hU5Kq2u Adding an Accent to our Contrast Shader - Lets Make a Side Scrolling Shooter - Part 4](https://i.ytimg.com/vi/gu_bFoI2fIg/mqdefault.jpg)


Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Implementing Scene Switching - An Elevator Between Scenes - Part 2](https://i.ytimg.com/vi/hr6ox4bg3Ow/mqdefault.jpg)


 we built previously.
Our shader is based off of this formula.
```
weight * colorA + (1 - weight) * colorB;
```
This formula uses a weight to balance between two colors. We can modify this by using a boolean value for the weight which will make it 1 when the boolean is true or 0 when the boolean is false. This will make it possible to turn our gradient between two colors into a hard transition instead.
We can modify our material in C# using code like this in order to animate it from code:
```csharp
material.SetFloat(_Transition, currentTransitionState);
```
Join the World of Zero Discord server: https://discord.gg/hU5Kq2u Color Contrast Shader - Lets Make a Side Scrolling Shooter - Part 3](https://i.ytimg.com/vi/jJcSbixSy5c/mqdefault.jpg)

- [`AnimFloat`](https://docs.unity3d.com/ScriptReference/AnimatedValues.AnimFloat.html)
- [`AnimQuaternion`](https://docs.unity3d.com/ScriptReference/AnimatedValues.AnimQuaternion.html)
- [`AnimVector3`](https://docs.unity3d.com/ScriptReference/AnimatedValues.AnimVector3.html)
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Using AnimatedValues in Custom Unity Editors](https://i.ytimg.com/vi/jfhCaijXm6M/mqdefault.jpg)



