Toon Shader
A shader that makes the object cellshaded and gives it an outline.
Look at my code
GitHub
How it works.
Cellshading:
The cellshading works by turning the lightvalue to a texture coordinate (0 to 1), then it multiplies the color of that texture coordinate to the object texture
to get the final color.
Outline:
It gives the object an outline by rendering multiple streched objects, only showing the backfaces and coloring them a predefined color. The amound it's
getting streched is also determined by a predefined number.
Back