Another major component of the toon shader is the Light Ramp node that is is used to calculate the shading over objects in the scene.

the node samples a gradient texture to determine the shading, for Shard Masters i used the gradients below, it doesn’t have to be these gradients specifically it can be any depending on the games aesthetics.


the toon shader also can receive multiple light sources this another custom function node that runs HLSL code to calculate the additional light sources before passing it into another sub graph to bring it all together to form the effect.

here the additional light calculations and the shading is then combined along with any additional global illumination values. the results are added to the main light node and passed out to the main toon graph
