Website powered by

Cel Lighting Shader for Unity URP

Cel Lighting Shader for URP with support for additional lights and shadows. Made in the Unity Shader Graph with some additional custom functions.

The lighting is based on a gradient texture which can be changed according to user preference. Took a while to get the shadows working for both the main light and additional lights, but it was worth the visual result :) my next goal would be moving all of it to HLSL and adding support for proper outlines since they can§t really be achieved by using the URP standard shader as a base.

The props and scenes used for the showcase are from RPG Poly Pack (Lite) downloaded from the Unity Asset Store.

Directional light + Spec + Shadows

Multiple Light Showcase

Shader Graph - 2 Custom Functions for Getting the main light and additional lights

Shader Graph - 2 Custom Functions for Getting the main light and additional lights

Test on objects

Lit scene - Day

Lit scene - Day

Lit scene - Night

Lit scene - Night