Final shading network

 

 

A simplified scene that demonstrates this shading effect can be found here.