Retro 3D depth-based shader

Okay, I’m way out of my depth here since the only shader I’ve ever written in Unity was a rim light effect What I’m trying to do is write a shader that bases how much something is lit not on the lights in the scene, but rather the normal direction relative to the camera and how far away it is. Right now I have this:

Which looks alright, but doesn’t match the aesthetic I want perfectly. What I want is this:

But I have no idea how to accomplish this or even where to start.

You need to posterize the lighting value. From my old memory of doing this sort of stuff it was due to having limited number of pixel colours or using half the normal colour range (to achieve over-bright and darkness).

At a guess i’d try calculating the light contribution then divide it by some factor (e.g 2, 4, 8), floor() it, then multiply it by the same factor. That should create the same banding effect, with the factor determining the number of bands.