ESEN
← back to shading

shading

Cell shader

Toon lighting for URP in Unity 6, built with Shader Graph and HLSL. One lighting Sub Graph shared by the character and floor materials.

  • Unity 6 · URP
  • 2026
  • Technical Artist · Team Igloo

This viewer needs WebGL2.

the light follows the cursor

The viewer is a WebGL port of the shader's lighting (ToonLighting.hlsl) with its base material values, on a sphere.

30 sresult & summary

What you see here

problem
With real-time shadows, shadow-map texels shifted the band threshold and left jagged edges. With Forward+, a regular loop couldn't see the additional lights.
solution
The light ramp and the shadow ramp are computed separately and combined with min, self-shadowing fades out at the terminator, and additional lights use the Forward+ loop.
result
Procedural or texture-based bands, specular, rim, and an inverted-hull outline with a constant pixel width.
7 minbreakdown

How I made it, step by step

How I built the project's toon lighting in URP: from banded half-Lambert to shadows without jagged edges, additional lights with Forward+ and a constant-width outline.

read the post →