Three.js How to modify a material shader multiple times

You may find this thread on chainable-onBeforeCompile uniforms useful