All examples · Shaders and post

Toon shading

What this example shows

A model material has two hooks, and you may write either, both or neither. Left is a plain sphere, middle has a colour hook that cuts the light into hard bands, right has a vertex hook that ripples the surface. Leave a hook out and the engine's own stands in.

The ripple is the interesting one: after the vertices move, the engine measures again which way the surface faces, by calling the hook twice more a hair away. Without that the sphere would ripple and still be lit as a smooth ball, which reads as the light being broken rather than the shape being moved.

Starting