/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as e,__param as t}from"tslib";import{uniform as r,texture as o,input as i,UniformGroup as s,FragmentOutput as f}from"../../GraphShaderModule.js";import{Mat4 as p,Sampler2D as l,texture2D as n,ifElse as c,Vec3 as a,greaterThan as m,Float as d,Vec4 as g}from"../../graph/glsl.js";import{PostProcessingFragmentInput as u,PostProcessingShader as h}from"./PostProcessingShader.js";class y extends s{}e([r(p)],y.prototype,"coefficients",void 0);class v extends h{constructor(){super(...arguments),this.type="FilterEffectShader"}fragment(e){const t=new f,r=n(this.colorTexture,e.uv),o=c(m(r.a,new d(0)),r.rgb.divide(r.a),new a(0)),i=this.filterEffectConfig.coefficients.multiply(new g(o,1)),s=r.a;return t.fragColor=new g(s.multiply(i.rgb),s),t}}e([r(y)],v.prototype,"filterEffectConfig",void 0),e([o(l)],v.prototype,"colorTexture",void 0),e([t(0,i(u))],v.prototype,"fragment",null);export{v as FilterEffectShader};
