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