Well, i managed to produce 2 shaders that give me (sort of) nightvision effect. I understand now how shaders work, so can you please explain to me how shadow shader "should" be made, so i'll try to understand it and work on it myself?

The thing that i do not understand is this: if "shadow" shader is applied to a model, how will the shader know how to apply shadow to a non-flat object that the model is standing on? Since shadow shader is applied to a model, it has no reference to the surface my model is standing on (or floats above) so i do not understand how can i know which parts of surface i need to darken (cast shadow on).