Change material if in shadow, like in the gif animation

For a movie, you can render the scene once using the normal material.
Render the lighting/shadows only.
Then render the scene a second time using the alternative shadow material.
Go into your video editing software, and composite the alternative material onto the original scene using the shadow as a mask. There is no point in fighting the limitations of real time deferred rendering if this is for an offline cinematic render.