customOnBeforeCompile = function customOnBeforeCompile(shader) {
                    try {
                        var materialDefine = _this2._getMaterialDefine()

                        // If Fragment shader is not empty, patch it
                        if (fragmentShader) {
                            var patchedFragmentShader = _this2._patchShader(stripComments(fragmentShader), shader.fragmentShader, true)
                            shader.fragmentShader = materialDefine + patchedFragmentShader
                        }

                        // If Vertex shader is not empty, patch it
                        if (vertexShader) {
                            var patchedVertexShader = _this2._patchShader(stripComments(vertexShader), shader.vertexShader)
                            shader.vertexShader = '#define IS_VERTEX;\n' + patchedVertexShader
                            shader.vertexShader = materialDefine + shader.vertexShader
                        }

                        // Patch uniforms
                        shader.uniforms = _objectSpread2(_objectSpread2({}, shader.uniforms), _this2.uniforms)
                        _this2.uniforms = shader.uniforms
                    } catch (error) {
                        console.error(error)
                    }
                }
Does the internal shader generation. Not meant to be called directly.

@param fragmentShader
@param vertexShader
@param uniforms