Color aura using shader graph

Color aura using shader graph


C-sharp Unity Shader graph

Context

In my game, Colorless Odyssey, for his lore, I needed to make the world colorless and to give the player an aura that restores the color of the world around him.

Also, there is fortresses when a color is dominant, so the color of this fortress is applied to all elements in the fortress and the color aura restore the original color of the object.

How the shader works

I have some global variables to set the player position and the radius of the aura.

  • _MaxDistanceFromPlayer: The radius of the aura
  • _MaxDistanceMultiplier: The multiplier of the distance to the player
  • _PlayerPos: The position of the player
  • _ThemeColor: The color applied to the whole scene
  • _ColorImpact: the percentage of the theme color applied to the object

First, for each pixel, I get his position and the player position to use them in a simple and gradient noise to make something random.

Noise

Then, I calculate the distance between the pixel and the player to get his final saturation.

Saturation

And I finish by applying the saturation to the pixel and add the left of saturation to the theme color like this:

Apply Saturation

So, this give this result in a fortress with a yellow theme, it restores the color of the flame, ground and carpet by removing the yellow color:

Result

Conclusion

It’s a good base, but I want to improve it to make the aura more noticeable.

© 2025 Alexis Haldy