Character ToonShader on Built-in & URP

This project is the exercise for the Celluloid Style Toon shader basic principle under the Unity URP and Built-in pipeline.

involved technology: C#, URP, HLSL

Please hit this to find implementation details

  • Bulit the outline feature which uses the normal expansion algorithm,and uses a Normal Smoothing algorithm to smooth the outline
  • Use stencil buffer and render object to control rendering order, and implement the external outline.
  • Implement multi-level shadows based on the Lambert lighting model, supporting ramp map and shadow map, built ramp map texture generation tool in Unity
  • Implemented  Cel-shading, using smoothstep to control the softness and hardness of the shadow. Implemented RimLight by Fresnel, Specular by Blinn-Phong, and bloom.
Render outline after Opaque objects
Lambert model with shadow level 2