shadow$provide.module$node_modules$pixi_DOT_js$lib$filters$defaults$displacement$DisplacementFilter = function(global, require, module, exports) {
  var Matrix = require("module$node_modules$pixi_DOT_js$lib$maths$matrix$Matrix"), Point = require("module$node_modules$pixi_DOT_js$lib$maths$point$Point"), 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"), Sprite = require("module$node_modules$pixi_DOT_js$lib$scene$sprite$Sprite"), 
  deprecation = require("module$node_modules$pixi_DOT_js$lib$utils$logging$deprecation");
  global = require("module$node_modules$pixi_DOT_js$lib$filters$Filter");
  var displacement = require("module$node_modules$pixi_DOT_js$lib$filters$defaults$displacement$displacement_frag"), displacement$1 = require("module$node_modules$pixi_DOT_js$lib$filters$defaults$displacement$displacement_vert"), displacement$2 = require("module$node_modules$pixi_DOT_js$lib$filters$defaults$displacement$displacement_wgsl");
  "use strict";
  class DisplacementFilter extends global.Filter {
    constructor(...args) {
      let options = args[0];
      options instanceof Sprite.Sprite && (args[1] && deprecation.deprecation(deprecation.v8_0_0, "DisplacementFilter now uses options object instead of params. {sprite, scale}"), options = {sprite:options, scale:args[1]});
      const {sprite, scale:scaleOption, ...rest} = options;
      args = scaleOption ?? 20;
      "number" === typeof args && (args = new Point.Point(args, args));
      args = new UniformGroup.UniformGroup({uFilterMatrix:{value:new Matrix.Matrix(), type:"mat3x3\x3cf32\x3e"}, uScale:{value:args, type:"vec2\x3cf32\x3e"}, uRotation:{value:new Float32Array([0, 0, 0, 0]), type:"mat2x2\x3cf32\x3e"}});
      const glProgram = GlProgram.GlProgram.from({vertex:displacement$1.default, fragment:displacement.default, name:"displacement-filter"}), gpuProgram = GpuProgram.GpuProgram.from({vertex:{source:displacement$2.default, entryPoint:"mainVertex"}, fragment:{source:displacement$2.default, entryPoint:"mainFragment"}}), textureSource = sprite.texture.source;
      super({...rest, gpuProgram, glProgram, resources:{filterUniforms:args, uMapTexture:textureSource, uMapSampler:textureSource.style}});
      this._sprite = options.sprite;
      this._sprite.renderable = !1;
    }
    apply(filterManager, input, output, clearMode) {
      const uniforms = this.resources.filterUniforms.uniforms;
      filterManager.calculateSpriteMatrix(uniforms.uFilterMatrix, this._sprite);
      const wt = this._sprite.worldTransform, lenX = Math.sqrt(wt.a * wt.a + wt.b * wt.b), lenY = Math.sqrt(wt.c * wt.c + wt.d * wt.d);
      0 !== lenX && 0 !== lenY && (uniforms.uRotation[0] = wt.a / lenX, uniforms.uRotation[1] = wt.b / lenX, uniforms.uRotation[2] = wt.c / lenY, uniforms.uRotation[3] = wt.d / lenY);
      this.resources.uMapTexture = this._sprite.texture.source;
      filterManager.applyFilter(this, input, output, clearMode);
    }
    get scale() {
      return this.resources.filterUniforms.uniforms.uScale;
    }
  }
  exports.DisplacementFilter = DisplacementFilter;
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$filters$defaults$displacement$DisplacementFilter.js.map
