function logPrettyShaderError(gl, shader) {
    var shaderSrc = gl.getShaderSource(shader)
        .split('\n')
        .map(function (line, index) { return index + ": " + line; });
    var shaderLog = gl.getShaderInfoLog(shader);
    var splitShader = shaderLog.split('\n');
    var dedupe = {};
    var lineNumbers = splitShader.map(function (line) { return parseFloat(line.replace(/^ERROR\: 0\:([\d]+)\:.*$/, '$1')); })
        .filter(function (n) {
        if (n && !dedupe[n]) {
            dedupe[n] = true;
            return true;
        }
        return false;
    });
    var logArgs = [''];
    lineNumbers.forEach(function (number) {
        shaderSrc[number - 1] = "%c" + shaderSrc[number - 1] + "%c";
        logArgs.push('background: #FF0000; color:#FFFFFF; font-size: 10px', 'font-size: 10px');
    });
    var fragmentSourceToLog = shaderSrc
        .join('\n');
    logArgs[0] = fragmentSourceToLog;
    console.error(shaderLog);
    // eslint-disable-next-line no-console
    console.groupCollapsed('click to view full shader code');
    console.warn.apply(console, logArgs);
    // eslint-disable-next-line no-console
    console.groupEnd();
}
will log a shader error highlighting the lines with the error
also will add numbers along the side.
@param gl - the WebGLContext
@param shader - the shader to log errors for