shadow$provide.module$node_modules$pixi_DOT_js$lib$filters$defaults$color_matrix$ColorMatrixFilter = function(global, require, module, exports) {
  var Color = require("module$node_modules$pixi_DOT_js$lib$color$Color"), GlProgram = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$gl$shader$GlProgram"), GpuProgram = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$gpu$shader$GpuProgram"), UniformGroup = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$shader$UniformGroup");
  global = require("module$node_modules$pixi_DOT_js$lib$filters$Filter");
  var defaultFilter = require("module$node_modules$pixi_DOT_js$lib$filters$defaults$defaultFilter_vert"), colorMatrixFilter$1 = require("module$node_modules$pixi_DOT_js$lib$filters$defaults$color_matrix$colorMatrixFilter_frag"), colorMatrixFilter = require("module$node_modules$pixi_DOT_js$lib$filters$defaults$color_matrix$colorMatrixFilter_wgsl");
  "use strict";
  class ColorMatrixFilter extends global.Filter {
    constructor(options = {}) {
      const colorMatrixUniforms = new UniformGroup.UniformGroup({uColorMatrix:{value:[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], type:"f32", size:20}, uAlpha:{value:1, type:"f32"}}), gpuProgram = GpuProgram.GpuProgram.from({vertex:{source:colorMatrixFilter.default, entryPoint:"mainVertex"}, fragment:{source:colorMatrixFilter.default, entryPoint:"mainFragment"}}), glProgram = GlProgram.GlProgram.from({vertex:defaultFilter.default, fragment:colorMatrixFilter$1.default, name:"color-matrix-filter"});
      super({...options, gpuProgram, glProgram, resources:{colorMatrixUniforms}});
      this.alpha = 1;
    }
    _loadMatrix(matrix, multiply = !1) {
      multiply ? (multiply = [...matrix], this._multiply(multiply, this.matrix, matrix), this.resources.colorMatrixUniforms.uniforms.uColorMatrix = multiply) : this.resources.colorMatrixUniforms.uniforms.uColorMatrix = matrix;
      this.resources.colorMatrixUniforms.update();
    }
    _multiply(out, a, b) {
      out[0] = a[0] * b[0] + a[1] * b[5] + a[2] * b[10] + a[3] * b[15];
      out[1] = a[0] * b[1] + a[1] * b[6] + a[2] * b[11] + a[3] * b[16];
      out[2] = a[0] * b[2] + a[1] * b[7] + a[2] * b[12] + a[3] * b[17];
      out[3] = a[0] * b[3] + a[1] * b[8] + a[2] * b[13] + a[3] * b[18];
      out[4] = a[0] * b[4] + a[1] * b[9] + a[2] * b[14] + a[3] * b[19] + a[4];
      out[5] = a[5] * b[0] + a[6] * b[5] + a[7] * b[10] + a[8] * b[15];
      out[6] = a[5] * b[1] + a[6] * b[6] + a[7] * b[11] + a[8] * b[16];
      out[7] = a[5] * b[2] + a[6] * b[7] + a[7] * b[12] + a[8] * b[17];
      out[8] = a[5] * b[3] + a[6] * b[8] + a[7] * b[13] + a[8] * b[18];
      out[9] = a[5] * b[4] + a[6] * b[9] + a[7] * b[14] + a[8] * b[19] + a[9];
      out[10] = a[10] * b[0] + a[11] * b[5] + a[12] * b[10] + a[13] * b[15];
      out[11] = a[10] * b[1] + a[11] * b[6] + a[12] * b[11] + a[13] * b[16];
      out[12] = a[10] * b[2] + a[11] * b[7] + a[12] * b[12] + a[13] * b[17];
      out[13] = a[10] * b[3] + a[11] * b[8] + a[12] * b[13] + a[13] * b[18];
      out[14] = a[10] * b[4] + a[11] * b[9] + a[12] * b[14] + a[13] * b[19] + a[14];
      out[15] = a[15] * b[0] + a[16] * b[5] + a[17] * b[10] + a[18] * b[15];
      out[16] = a[15] * b[1] + a[16] * b[6] + a[17] * b[11] + a[18] * b[16];
      out[17] = a[15] * b[2] + a[16] * b[7] + a[17] * b[12] + a[18] * b[17];
      out[18] = a[15] * b[3] + a[16] * b[8] + a[17] * b[13] + a[18] * b[18];
      out[19] = a[15] * b[4] + a[16] * b[9] + a[17] * b[14] + a[18] * b[19] + a[19];
      return out;
    }
    brightness(b, multiply) {
      this._loadMatrix([b, 0, 0, 0, 0, 0, b, 0, 0, 0, 0, 0, b, 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    tint(color, multiply) {
      const [r, g, b] = Color.Color.shared.setValue(color).toArray();
      this._loadMatrix([r, 0, 0, 0, 0, 0, g, 0, 0, 0, 0, 0, b, 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    greyscale(scale, multiply) {
      this._loadMatrix([scale, scale, scale, 0, 0, scale, scale, scale, 0, 0, scale, scale, scale, 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    grayscale(scale, multiply) {
      this.greyscale(scale, multiply);
    }
    blackAndWhite(multiply) {
      this._loadMatrix([0.3, 0.6, 0.1, 0, 0, 0.3, 0.6, 0.1, 0, 0, 0.3, 0.6, 0.1, 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    hue(rotation, multiply) {
      rotation = (rotation || 0) / 180 * Math.PI;
      const cosR = Math.cos(rotation);
      rotation = Math.sin(rotation);
      var sqrt = Math.sqrt;
      const w = 1 / 3;
      sqrt = sqrt(w);
      this._loadMatrix([cosR + (1 - cosR) * w, w * (1 - cosR) - sqrt * rotation, w * (1 - cosR) + sqrt * rotation, 0, 0, w * (1 - cosR) + sqrt * rotation, cosR + w * (1 - cosR), w * (1 - cosR) - sqrt * rotation, 0, 0, w * (1 - cosR) - sqrt * rotation, w * (1 - cosR) + sqrt * rotation, cosR + w * (1 - cosR), 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    contrast(amount, multiply) {
      amount = (amount || 0) + 1;
      const o = -0.5 * (amount - 1);
      this._loadMatrix([amount, 0, 0, 0, o, 0, amount, 0, 0, o, 0, 0, amount, 0, o, 0, 0, 0, 1, 0], multiply);
    }
    saturate(amount = 0, multiply) {
      amount = 2 * amount / 3 + 1;
      const y = -0.5 * (amount - 1);
      this._loadMatrix([amount, y, y, 0, 0, y, amount, y, 0, 0, y, y, amount, 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    desaturate() {
      this.saturate(-1);
    }
    negative(multiply) {
      this._loadMatrix([-1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0], multiply);
    }
    sepia(multiply) {
      this._loadMatrix([0.393, 0.7689999, 0.18899999, 0, 0, 0.349, 0.6859999, 0.16799999, 0, 0, 0.272, 0.5339999, 0.13099999, 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    technicolor(multiply) {
      this._loadMatrix([1.9125277891456083, -0.8545344976951645, -0.09155508482755585, 0, 0.046249425232852304, -0.3087833385928097, 1.7658908555458428, -0.10601743074722245, 0, -0.2758903984886823, -0.231103377548616, -0.7501899197440212, 1.847597816108189, 0, 0.12137623870388682, 0, 0, 0, 1, 0], multiply);
    }
    polaroid(multiply) {
      this._loadMatrix([1.438, -0.062, -0.062, 0, 0, -0.122, 1.378, -0.122, 0, 0, -0.016, -0.016, 1.483, 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    toBGR(multiply) {
      this._loadMatrix([0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    kodachrome(multiply) {
      this._loadMatrix([1.1285582396593525, -0.3967382283601348, -0.03992559172921793, 0, 0.24991995145868634, -0.16404339962244616, 1.0835251566291304, -0.05498805115633132, 0, 0.09698983488904393, -0.16786010706155763, -0.5603416277695248, 1.6014850761964943, 0, 0.13972481597886063, 0, 0, 0, 1, 0], multiply);
    }
    browni(multiply) {
      this._loadMatrix([0.5997023498159715, 0.34553243048391263, -0.2708298674538042, 0, 0.1860075629647401, -0.037703249837783157, 0.8609577587992641, 0.15059552388459913, 0, -0.14497417640467167, 0.24113635128153335, -0.07441037908422492, 0.44972182064877153, 0, -0.029655197167024642, 0, 0, 0, 1, 0], multiply);
    }
    vintage(multiply) {
      this._loadMatrix([0.6279345635605994, 0.3202183420819367, -0.03965408211312453, 0, 0.037848179746251466, 0.02578397704808868, 0.6441188644374771, 0.03259127616149294, 0, 0.029265996770472907, 0.0466055556782719, -0.0851232987247891, 0.5241648018700465, 0, 0.020232119953863904, 0, 0, 0, 1, 0], multiply);
    }
    colorTone(desaturation, toned, lightColor, darkColor, multiply) {
      desaturation || (desaturation = 0.2);
      toned || (toned = 0.15);
      lightColor || (lightColor = 16770432);
      darkColor || (darkColor = 3375104);
      const temp = Color.Color.shared, [lR, lG, lB] = temp.setValue(lightColor).toArray(), [dR, dG, dB] = temp.setValue(darkColor).toArray();
      this._loadMatrix([0.3, 0.59, 0.11, 0, 0, lR, lG, lB, desaturation, 0, dR, dG, dB, toned, 0, lR - dR, lG - dG, lB - dB, 0, 0], multiply);
    }
    night(intensity, multiply) {
      intensity || (intensity = 0.1);
      this._loadMatrix([-2 * intensity, -intensity, 0, 0, 0, -intensity, 0, intensity, 0, 0, 0, intensity, 2 * intensity, 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    predator(amount, multiply) {
      this._loadMatrix([11.224130630493164 * amount, -4.794486999511719 * amount, -2.8746118545532227 * amount, 0 * amount, 0.40342438220977783 * amount, -3.6330697536468506 * amount, 9.193157196044922 * amount, -2.951810836791992 * amount, 0 * amount, -1.316135048866272 * amount, -3.2184197902679443 * amount, -4.2375030517578125 * amount, 7.476448059082031 * amount, 0 * amount, 0.8044459223747253 * amount, 0, 0, 0, 1, 0], multiply);
    }
    lsd(multiply) {
      this._loadMatrix([2, -0.4, 0.5, 0, 0, -0.5, 2, -0.4, 0, 0, -0.4, -0.5, 3, 0, 0, 0, 0, 0, 1, 0], multiply);
    }
    reset() {
      this._loadMatrix([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], !1);
    }
    get matrix() {
      return this.resources.colorMatrixUniforms.uniforms.uColorMatrix;
    }
    set matrix(value) {
      this.resources.colorMatrixUniforms.uniforms.uColorMatrix = value;
    }
    get alpha() {
      return this.resources.colorMatrixUniforms.uniforms.uAlpha;
    }
    set alpha(value) {
      this.resources.colorMatrixUniforms.uniforms.uAlpha = value;
    }
  }
  exports.ColorMatrixFilter = ColorMatrixFilter;
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$filters$defaults$color_matrix$ColorMatrixFilter.js.map
