Trying to make Toon Shader Material on UE4

I managed to get something sort of working but not entirely sure WHY it works…

I’ve mixed the cel shader from before with the specular/emissive custom depth buffer from earlier in the thread. However, weirdly, nothing is actually set in that depth buffer but it still manages to produce the cel shaded effect on these particular objects. I also found that if I set each object to just a flat colored texture and turned specularity way down it had a much better effect.