Shadergraph: Matcap, Halftone & Toon
Updated 9 hours ago
7 min. read
Matcap stands for material capture, matcap shaders give fine grain control over the way our surfaces are rendered. They contain information about complex lighting data that we wouldn't be able to recreate in real time. You can use any 3d rendering software to create your own matcaps or you can get them from online, example from zbrush download center.
Halftone is a technique used in printing to simulate gradation in color by modulating the density of a two tone pattern.
Toon, you can create your own color ramps in softwares like photoshop or use the new gradient node in shadergraph


For the halftone and toon shaders, i have used a predefined vector4 for the light direction. This means that the model will not get affected when the directional light in the scene changes rotation. Lately Unity has added the ability to access properties in shadergraph from code which would let us have the shader react to the light direction in realtime. This was mentioned here Unite Berlin 2018 - Using Shader Graph to Create Shaders Without Code. I have tried to implement this method in my shaders but it gave A LOT of errors and i couldn't figure out why, then i discovered the video was using a beta version 2018.2.0bf while i was using 2018.2.7f1. You can give the beta version a try if you want, i have linked the specific minute where this is mentioned in the Unite Berlin video, and it is a very minor change to the shaders i provided here.

The Statue

It is a Danish statue model scanned by Geoffrey Marchal. The model is optimized (decimated) for real-time rendering use.
The scan is shared under the Creative Commons Attribution license (CC BY 4.0). It is free to use with attribution to the author (Geoffrey Marchal).
Project is available on Github

Heba Sherif