/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as o,__param as t}from"tslib";import{uniform as e,texture as r,input as s,UniformGroup as p,FragmentOutput as i}from"../../GraphShaderModule.js";import{Vec4 as a,Vec2 as l,Mat3 as d,Sampler2D as u,Vec3 as m,Float as y,texture2D as n}from"../../graph/glsl.js";import{PostProcessingFragmentInput as f,PostProcessingShader as h}from"./PostProcessingShader.js";class c extends p{}o([e(a)],c.prototype,"shadowColor",void 0),o([e(l)],c.prototype,"shadowOffset",void 0),o([e(d)],c.prototype,"displayViewMat3",void 0);class w extends h{constructor(){super(...arguments),this.type="CompositeShader"}fragment(o){const t=new i,{shadowColor:e,shadowOffset:r,displayViewMat3:s}=this.compositeConfig,p=s.multiply(new m(r,new y(0))),a=n(this.layerFBOTexture,o.uv),l=n(this.blurTexture,o.uv.subtract(p.xy.divide(2)));return t.fragColor=l.a.multiply(e).multiply(new y(1).subtract(a.a)).add(a),t}}o([e(c)],w.prototype,"compositeConfig",void 0),o([r(u)],w.prototype,"layerFBOTexture",void 0),o([r(u)],w.prototype,"blurTexture",void 0),o([t(0,s(f))],w.prototype,"fragment",null);export{w as DropShadowCompositeShader};
