Adding an Accent to our Contrast Shader - Lets Make a Side Scrolling Shooter - Part 4 @WorldOfZeroDevelopment
Adding an Accent to our Contrast Shader - Lets Make a Side Scrolling Shooter - Part 4  @WorldOfZeroDevelopment
Uploaded July 2018 | Updated November 2026, 4 days ago
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: 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: discord.gg/hU5Kq2u
Adding an Accent to our Contrast Shader - Lets Make a Side Scrolling Shooter - Part 4Building A Game of Dice - #GMTKJam 2022 - Day 2Implementing Scene Switching - An Elevator Between Scenes - Part 2Embedding Shadertoy in Hugo Websites - Custom Hugo ShortcodesExploring MAUI - Multiplatform Apps Built With .NETColor Contrast Shader - Lets Make a Side Scrolling Shooter - Part 3Using AnimatedValues in Custom Unity EditorsI Built a Tool That Turns GitHub Contributions into Bookmarks Heres How It WorksBuilding Markdown Based Powerpoint Presentations with Remark.JSI See Game Objects - Unity Observer - Part 2Inline Initializing C# Dictionaries - Quick TipLive Coding a 3D Voxel Cube in Unity
World of Zero |

Adding an Accent to our Contrast Shader - Lets Make a Side Scrolling Shooter - Part 4

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER