Toon Render Pipeline (TRP)
A custom render pipeline I made in Unity specially designed to create a stylized look. My goal was to be able to achieve a variety of different toon styles, all within the same pipeline. As a result, this pipeline is capable of producing styles ranging from Windwaker to Borderlands to Hi-Fi Rush.
-
The art assets featured in the images and clips below were NOT created by me. They are only used as example assets to show what the render pipeline is capable of achieving.

Features
Cel Shaded Materials
One of the main characteristics of a stylized toon look is cel shading. As such, I made sure that the default lit shader for this pipeline made use of cel shading when dealing with diffuse, specular, and rim lighting. The shader also makes use of normal maps and MAODS maps to optimize the shader as much as possible. Lightmaps, GI, reflection probes, and light probes are also all supported.
Sobel Outlines and Camera Normals Pass
Another technique that is commonly used in toon styled rendering is outlining. There are many ways to handle the rendering of outlines, but the approach that I chose to use was Sobel edge detection. Sobel edge detection requires sampling both the camera's depth texture and the camera's normal texture. Since this is a custom render pipeline, neither of these textures are provided by Unity by default.
To solve this, I created my own custom pass that renders the entire scene using an override shader. That result is then written into a temporary render texture that I called 'CameraNormalsTexture'. Now that I had all the necessary textures to achieve Sobel edge detection, I created a Sobel outline post processing shader and implemented it via Unity's Volume Component system.

Custom Point Light and Spotlight Falloffs
A more unique feature that I chose to implement when developing this pipeline was custom light falloffs. This technique has been used very effectively in games such as Windwaker and Hi-Fi Rush, and thus I felt it would be a nice addition to the pipeline. So when calculating the light falloffs for point lights and spotlights, I decided to give the option to split the falloff into discrete bands. This effect was very easy to implement, but really helped to tie the whole pipeline together.
