Devlog: Fancy New Shader

Devlog: Fancy New Shader

I put off learning shader graph in favour of shaderlab and now I’m questioning why?! Over the last week or so I’ve been working on a new and improved toon shader. Why? Because there were some elemtns of game play I wanted to introduce that was not possible with an unlit shader (shaders that does not take light into effect).

Part of the reason I avoided creating a new shader for so long was because I didn’t know how to keep the clean toon effect with strong handdrawn elements without taking away from that feeling. But after the painstaking transition over to Unity’s URP (Universal Render Pipeline), I started playing around with Shader Graph and found that it was actually far easier to experiement with than the older shaderlab.

Day/Night Cycle

Now, combined with my new environment manager, I can easily control the time of day with a slip of a slider, which not only controls the color and brightness of the sun but also the direction. It’s so easy now to transition between the sun and moon, making for great spooky night time zombie smashing.

Spotlights!

I also started experimenting with spotlights for use with potential things such as torches, down lights, and other environmental effects. I was able to create a gradient of brightness while maintaining the toon banding seen below.

So what do you think? I’m always keen to hear your feedback. Do you like it? Hate it? Join the discord and share your thoughts. There are no wrong answers.