Blender EEVEE/Cycles Matcap Shader
Matcap Shader for EEVEE/Cycles. Mostly useful for displacement painting.
Why?
The primary usecase of this shader is to aid in painting displacement maps in Texture Paint mode, while still displaying the result as it would if you were to sculpt the detail. Painting displacement maps can help with situations in which you'd have to use enormous poly counts to achieve the same result with proper geometry, e.g. for skin microdetails.
How does this actually work?
Matcaps are basically just images of spheres shaded some specific way. The idea is that we sample the normal of the geometry to be rendered, and then pick the corresponding point on the sphere showing the same surface normal. This involves only some rather basic maths and a single texture lookup and is therefore incredibly fast.
This allows to do some rather complex shading on highly detailed geometry on the cheap, hence why matcaps have become so popular for sculpting.