shadow$provide.module$node_modules$pixi_DOT_js$lib$rendering$renderers$gl$shader$program$logProgramError = function(global, require, module, exports) {
  function logPrettyShaderError(gl, shader) {
    const rawSource = gl.getShaderSource(shader);
    if (null === rawSource) {
      console.error("PixiJS Error: Could not retrieve shader source (WebGL context may be lost).");
    } else {
      var shaderSrc = rawSource.split("\n").map((line, index) => `${index}: ${line}`);
      gl = gl.getShaderInfoLog(shader) ?? "";
      var dedupe = {}, logArgs = [""];
      gl.split("\n").map(line => parseFloat(line.replace(/^ERROR: 0:([\d]+):.*$/, "$1"))).filter(n => n && !dedupe[n] ? dedupe[n] = !0 : !1).forEach(number => {
        shaderSrc[number - 1] = `%c${shaderSrc[number - 1]}%c`;
        logArgs.push("background: #FF0000; color:#FFFFFF; font-size: 10px", "font-size: 10px");
      });
      shader = shaderSrc.join("\n");
      logArgs[0] = shader;
      console.error(gl);
      console.groupCollapsed("click to view full shader code");
      console.warn(...logArgs);
      console.groupEnd();
    }
  }
  exports.logProgramError = function(gl, program, vertexShader, fragmentShader) {
    gl.getProgramParameter(program, gl.LINK_STATUS) || (gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS) || logPrettyShaderError(gl, vertexShader), gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS) || logPrettyShaderError(gl, fragmentShader), console.error("PixiJS Error: Could not initialize shader."), "" !== gl.getProgramInfoLog(program) && console.warn("PixiJS Warning: gl.getProgramInfoLog()", gl.getProgramInfoLog(program)));
  };
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$rendering$renderers$gl$shader$program$logProgramError.js.map
