/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{tileSize as e}from"../../../definitions.js";import{Technique as o}from"../Technique.js";import{AspectTechnique as r}from"./processor/AspectTechnique.js";import{BandArithmeticTechnique as s}from"./processor/BandArithmeticTechnique.js";import{ColormapToRGBTechnique as t}from"./processor/ColormapToRGBTechnique.js";import{CompositeBandTechnique as i}from"./processor/CompositeBandTechnique.js";import{ComputeChangeTechnique as c}from"./processor/ComputeChangeTechnique.js";import{ContrastBrightnessTechnique as p}from"./processor/ContrastBrightnessTechnique.js";import{ConvolutionTechnique as n}from"./processor/ConvolutionTechnique.js";import{CurvatureTechnique as m}from"./processor/CurvatureTechnique.js";import{ExtractBandTechnique as h}from"./processor/ExtractBandTechnique.js";import{FocalStatisticsTechnique as u}from"./processor/FocalStatisticsTechnique.js";import{GrayscaleTechnique as a}from"./processor/GrayscaleTechnique.js";import{HillshadeTechnique as f}from"./processor/HillshadeTechnique.js";import{LocalTechnique as q}from"./processor/LocalTechnique.js";import{MaskTechnique as j}from"./processor/MaskTechnique.js";import{NDVITechnique as l}from"./processor/NDVITechnique.js";import{RemapTechnique as T}from"./processor/RemapTechnique.js";import{ReprojectTechnique as d}from"./processor/ReprojectTechnique.js";import{ShadedReliefTechnique as C}from"./processor/ShadedReliefTechnique.js";import{SlopeTechnique as B}from"./processor/SlopeTechnique.js";import{StretchTechnique as _}from"./processor/StretchTechnique.js";import{createNewFBO as R}from"./processor/textureUtils.js";const S=new Map([["Aspect",r],["BandArithmetic",s],["ColormapToRGB",t],["CompositeBand",i],["ComputeChange",c],["ContrastBrightness",p],["Convolution",n],["Curvature",m],["ExtractBand",h],["Grayscale",a],["Hillshade",f],["Local",q],["Mask",j],["NDVI",l],["Remap",T],["Reproject",d],["ShadedRelief",C],["Slope",B],["Statistics",u],["Stretch",_]]);class g extends o{constructor(){super(...arguments),this.type=1,this.shaders={},this._techniques=new Map}shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0;for(const o of this._techniques.values())o.shutdown();this._techniques.clear()}render(o,r){this._fbo??=R(o.context,e,e);let{name:s}=o.rasterFunction;if("Arithmetic"===s&&(s="Local"),!this._techniques.has(s)){const e=S.get(s);if(!e)return;this._techniques.set(s,new e)}this._techniques.get(s).render(o,{...r,processorFbo:this._fbo})}}export{g as RasterProcessorTechnique};
