UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

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