Custom Toon Shader in Blender Eevee Using Shader to RGB

This guide explains how to build a flexible, non-photorealistic toon (cel) shader in Blender using the Eevee render engine. By converting BSDF light data into raw color values with the Shader to RGB node, you can clamp smooth lighting gradients into sharp color bands using a ColorRamp, creating a classic comic or anime visual style.

1. Set the Render Engine to Eevee

The Shader to RGB node is exclusive to Eevee and does not function in Cycles.

  1. Open the Render Properties tab in the Properties panel.
  2. Set the Render Engine to Eevee (or Eevee Next in Blender 4.2+).
  3. Switch the 3D Viewport shading mode to Rendered (shortcut: Z > Rendered).

2. Basic Node Setup

  1. Select your 3D model and navigate to the Shading workspace.
  2. Click New to create a new material.
  3. In the Shader Editor, delete the default Principled BSDF node.
  4. Press Shift + A to add the following nodes:
    • Diffuse BSDF (Shader > Diffuse BSDF)
    • Shader to RGB (Converter > Shader to RGB)
    • ColorRamp (Converter > ColorRamp)
  5. Connect the nodes in sequence:
    • Connect Diffuse BSDF BSDF output to Shader to RGB Shader input.
    • Connect Shader to RGB Color output to ColorRamp Fac input.
    • Connect ColorRamp Color output directly to the Material Output Surface input.

3. Create the Cel Shading Bands

  1. On the ColorRamp node, change the interpolation dropdown from Linear to Constant.
  2. Select the left stop (the black marker) and change its color to your shadow tone.
  3. Select the right stop (the white marker) and set it to your base lit color.
  4. Drag the right stop to the left to adjust where the shadow threshold falls along the object's surface.
  5. Click the + (plus) button on the ColorRamp to add more color stops for midtones, secondary shadows, or highlights.

4. Add Specular Highlights (Optional)

To add sharp, glossy highlights:

  1. Add a Glossy BSDF node (Shift + A > Shader > Glossy BSDF).
  2. Set its Roughness to a low value (e.g., 0.1).
  3. Add a second Shader to RGB node and a second ColorRamp node.
  4. Connect the Glossy BSDF to the second Shader to RGB node, then into the second ColorRamp set to Constant.
  5. Position the white marker near the far right to capture only the brightest reflection.
  6. Add a Mix Color node (Shift + A > Color > Mix Color), set the blend mode to Add, and combine the output of both ColorRamps before plugging the final result into the Material Output.