onLoad = function onLoad() {
              self._decrementPreload();
              if (callback) {
                callback(loadedShader);
              }
            }
Loads a custom shader from the provided vertex and fragment
shader paths. The shader files are loaded asynchronously in the
background, so this method should be used in <a href="#/p5/preload">preload()</a>.

For now, there are three main types of shaders. p5 will automatically
supply appropriate vertices, normals, colors, and lighting attributes
if the parameters defined in the shader match the names.

@method loadShader
@param {String} vertFilename path to file containing vertex shader
source code
@param {String} fragFilename path to file containing fragment shader
source code
@param {function} [callback] callback to be executed after loadShader
completes. On success, the Shader object is passed as the first argument.
@param {function} [errorCallback] callback to be executed when an error
occurs inside loadShader. On error, the error is passed as the first
argument.
@return {p5.Shader} a shader object created from the provided
vertex and fragment shader files.

@example
<div modernizr='webgl'>
<code>
let mandel;
function preload() {
  // load the shader definitions from files
  mandel = loadShader('assets/shader.vert', 'assets/shader.frag');
}
function setup() {
  createCanvas(100, 100, WEBGL);
  // use the shader
  shader(mandel);
  noStroke();
  mandel.setUniform('p', [-0.74364388703, 0.13182590421]);
}

function draw() {
  mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));
  quad(-1, -1, 1, -1, 1, 1, -1, 1);
}
</code>
</div>

@alt
zooming Mandelbrot set. a colorful, infinitely detailed fractal.