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.
- Open the Render Properties tab in the Properties panel.
- Set the Render Engine to Eevee (or Eevee Next in Blender 4.2+).
- Switch the 3D Viewport shading mode to Rendered
(shortcut:
Z> Rendered).
2. Basic Node Setup
- Select your 3D model and navigate to the Shading workspace.
- Click New to create a new material.
- In the Shader Editor, delete the default Principled BSDF node.
- Press
Shift + Ato add the following nodes:- Diffuse BSDF (Shader > Diffuse BSDF)
- Shader to RGB (Converter > Shader to RGB)
- ColorRamp (Converter > ColorRamp)
- Connect the nodes in sequence:
- Connect Diffuse BSDF
BSDFoutput to Shader to RGBShaderinput. - Connect Shader to RGB
Coloroutput to ColorRampFacinput. - Connect ColorRamp
Coloroutput directly to the Material OutputSurfaceinput.
- Connect Diffuse BSDF
3. Create the Cel Shading Bands
- On the ColorRamp node, change the interpolation dropdown from Linear to Constant.
- Select the left stop (the black marker) and change its color to your shadow tone.
- Select the right stop (the white marker) and set it to your base lit color.
- Drag the right stop to the left to adjust where the shadow threshold falls along the object's surface.
- 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:
- Add a Glossy BSDF node (
Shift + A> Shader > Glossy BSDF). - Set its Roughness to a low value (e.g.,
0.1). - Add a second Shader to RGB node and a second ColorRamp node.
- Connect the Glossy BSDF to the second Shader to RGB node, then into the second ColorRamp set to Constant.
- Position the white marker near the far right to capture only the brightest reflection.
- 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.