I built a custom ShaderMaterial that can be cloned and have their uniforms changed for different Meshes, while using just one shader program (as described in this comment Three.js, sharing ShaderMaterial between meshes but with different uniform sets - Stack Overflow).
Is this possible with built-in materials? I’d like to tweak the shaders in MeshLambertMaterial via .onBeforeCompile(), clone it repeatedly, and then change uniforms for each clone. All while using one program.
Another route I’m trying is replicating MeshLambertMaterial by plugging in the shaders into ShaderMaterial, but that is trickier than I expected.