Shader node network for master material

I created a single master material for this scene that gave me the ability to turn on and off different features in material instances. It was used for everything in the scene except alphamapped foliage, which used almost an exact copy of it with a very small change to accomodate alphamasks.

This material could do A->B blends in vertex alpha with or without threshold blend masks, grime overlays in vertex red with seperate optional threshold blend and selectable normal map for either stains or grime, rimlight and fresnel term controls, optional macronormal overlay, and UV tiling multiplier controls for most maps. It was extremely flexible and the rimlight naturally masked for only upwardfacing surfaces, so I could even use it on the terrain with the overhang.

On most objects, enough options were disabled that it was just as cheap (or cheaper) than a multitude of more specialized materials.

Shader