A question about shaders and removing unwanted variables

There is project setting that you want to enable forward shading. This should already help a lot. Then go to code file:
https://github.com/EpicGames/UnrealEngine/blob/4.13/Engine/Shaders/BasePassPixelShader.usf#L1010
And start to nuke everything that seems to be unrelevant, remember that shader compiler get rid of all dead code anyway. You need to write your own shading model for your custom need but it should be quite simple.


color = BaseColor * lerp(1.0, shadowColor, shadowAmount);