A stylized toon shader with customizable lighting, rim effects, and specular highlights built in Unity's Shader Graph.
This toon shader uses Unity's Shader Graph. It separates into different chains: a color and lighting path that handles texture sampling and diffuse calculations, a specular highlight system for stylized reflections, and a rim lighting network for edge definition. The modular design allows individual components to be tweaked independently while maintaining visual coherence across the final output.
The rim lighting system uses a Fresnel effect combined with dot product calculations between the view direction and surface normal to create stylized edge highlights. Custom parameters control the rim color and power (intensity), allowing artists to dial in the exact amount of edge definition needed. The multiply node combines the geometric calculations with color data, while the smoothstep function creates clean, controllable falloff for that characteristic toon-shaded look.
This section handles the color data by sampling diffuse lighting calculations. The shader multiplies the texture color with lighting information derived from the dot product of surface normals and light direction. This creates a solid foundation for the appearance, where smooth gradients are turned into distinct bands of light and shadow that define the toon aesthetic.
The specular component creates sharp, stylized highlights characteristic of toon shading by calculating the relationship between view direction and reflected light. Using dot product operations and power functions, the shader generates highlight shapes that can be modified through exposed parameters for specular power and max shadow values. This approach gives artists precise control over where and how intensely highlights appear, maintaining the hand-drawn aesthetic while responding to scene lighting.
Building this toon shader deepened my understanding of non-realistic rendering techniques and the mathematical foundations of lighting calculations in real-time graphics. I gained hands-on experience with Unity's Shader Graph workflow, learning how to balance artistic control with performance optimization. The project taught me how to deconstruct complex visual styles into modular shader components, making the system both maintainable and artist-friendly. Working with dot products, Fresnel effects, and view-dependent calculations strengthened my ability to translate visual concepts into mathematical operations.
This shader project reinforces my commitment to creating tools and systems that empower artists while maintaining technical excellence. The modular architecture demonstrates my ability to build flexible, parametric solutions that adapt to diverse artistic needs. Moving forward, I want to expand this foundation by exploring advanced techniques like outline rendering, cross-hatching effects, and dynamic lighting responses. This work strengthens my goal of specializing in shader development and real-time rendering systems that bridge the gap between artistic vision and technical implementation.