How to get Three.js Shader Source Code at Runtime
Three.js builds its shaders with a tricky system of string concatenation based on data in your scene, like the current number of lights. Under the hood, at least as of r100, Three.js builds shaders using a function called initMaterial, which happens only at render time, if the material…