/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as t,__param as e}from"tslib";import{GraphShaderModule as o,FragmentOutput as r,location as s,uniform as i,texture as p,input as n,VertexInput as l,UniformGroup as m,FragmentInput as a}from"../../../../GraphShaderModule.js";import{Vec4 as g,Vec2 as u,Sampler2D as c}from"../../../../graph/glsl.js";import{uvToClip as x}from"../../utils.js";import{getPixelLocation as d,getPixel as f}from"../projection.js";class v extends l{}t([s(0,u)],v.prototype,"position",void 0);class y extends a{}class h extends m{}t([i(u)],h.prototype,"srcImageSize",void 0);class j extends o{vertex(t){return{uv:t.position,glPosition:new g(x(t.position),0,1)}}fragment(t){const e=new r,o=d(t.uv),s=this._process(o);return e.fragColor=new g(s.rgb,1).multiply(s.a),e}_getPixel(t){return f(t,{texture:this.texture,srcImageSize:this.config.srcImageSize})}}t([i(h)],j.prototype,"config",void 0),t([p(c)],j.prototype,"texture",void 0),t([e(0,n(v))],j.prototype,"vertex",null),t([e(0,n(y))],j.prototype,"fragment",null);export{j as BaseRasterProcessorShader};
