Toon - Cartoon - Shader

Scene materials.

Material preset #1 (Linear attenuation).

Material preset #2 (Cell attenuation).

Material preset #3 (Multiple cell attenuation).

Material preset #4 (Texture attenuation).

Examples of different types of attenuation.

Warp effect on attenuation mask.

Warp effect on attenuation mask.

Same method as sun attenuation, but applied to light sources and spotlights.

Spot and point light example.

Two type of shadow, filled and sample texture.

Two way to do specular (Blinn-Phong or Phong).

Rim light is the combination of two effects: the Fresnel effect and the DotNL effect.

Rim and specular example.

Sub-surface scattering (SSS) is a combination of two effects: Fresnel effect and the DotVL effect.

Result of SSS on foliage.

Result of SSS on foliage.

The fog is generated by calculating the distance between the camera and the world positions. I explain the atmospheric system in more detail in the skybox breakdown.

The fog is generated by calculating the distance between the camera and the world positions. I explain the atmospheric system in more detail in the skybox breakdown.

Result of fog on terrain.

Result of fog on terrain.

Sample material capture (matcap).

Sample material capture (matcap).

Sample screen texture.

To keep aspect ratio and same tilling. I multiply the screen coordinates by the distance between the object position and the camera position, and then I multiply this coordinate by the screen resolution.

To keep aspect ratio and same tilling. I multiply the screen coordinates by the distance between the object position and the camera position, and then I multiply this coordinate by the screen resolution.

Classic depth and normal sobel but per objects.

Main shader graph.

Main shader graph.

Parameters #1

Parameters #1

Parameters #2

Parameters #2

Parameters #3

Parameters #3

Parameters #4

Parameters #4

Toon - Cartoon - Shader

Hi,

In this post, i showcases a custom NPR shader designed to support a wide range of artistic styles
It was developed using a node-based workflow in the Amplify Shader Editor, with lighting effects organized into modular, reusable functions.

Main features of the NPR Shader:
- SunLight models (Linear, Cell, Texture)
- Points and spots light (Linear, Cell, Texture)
- Shadow control (None, Filled, Texture)
- Light and sunlight warp effects
- Specular (Sun & Light)
- RimLight (Sun & Light)
- Subsurface scattering (SSS)
- MatCap (Additive & Multiplicative)
- Sample screen texture (additive or multiplicative)
- Edge detection (depth & normal)
- Fog (shared function)
- Animation (various animations in the vertex shader)
- Alpha (Alpha clip)

Each feature is highly customizable, with settings such as color, size mask, duration, side selection, lighting type, type of attenuation, ...
To avoid including functions not used for a specific material, I use compil variant.

I tried my best to maintain the highest video quality, but once it’s uploaded, the compression algorithm degrades the quality.

Enjoy !

More artwork