OK, I’m pretty sure somebody has posted this before, but here is my version of some cel-shading using Nodes.
This was a bit more complex, but it seems that they made some fixes to Blender, so the ramp settings work as they should, both in perspective and orthographic mode.
Dot product of the view and normal of the geometry goes into the Factor for the Color Ramp, which gets multiplied with the diffuse color and multiplied by the actual color of the material. This should allow you to use textures and lighting models (e.g. Lamber, Toon, Fresnel, etc) as usual, but have the cel-shading effect on top, so to speak. This means that the cel shading effect itself should probably just be black and white, or gray scale so as not to intefere with the “actual” material (though the example does have yellow coloring to show the highlights).
MaterialCelShadeDynamicFixed.blend (540 KB)