/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{BaseRasterProcessorTechnique as e}from"./BaseRasterProcessorTechnique.js";import{computeZFactor as s}from"../../shaders/raster/surface.js";import{ShadedReliefShader as r}from"../../shaders/raster/processor/ShadedReliefShader.js";class t extends e{constructor(){super(...arguments),this.name="RasterShadedReliefProcessor",this.type=20,this.shaders={shadedRelief:new r}}_process(e,r,t){const o=e.rasterFunction.parameters,a={isMultidirectional:o.hillshadeType>0},i=r.getRasterCellSize(),n=s(o,i),d={...o,factor:n},h={colormapTexture:{texture:t,unit:1},colormapOffset:o.offset,colormapMaxIndex:o.indexedColormap.length/4-1},l=this._getCommonConfig(e,r),f={shader:this.shaders.shadedRelief,uniforms:{config:l,hillshadeConfig:d,colormapConfig:h},defines:a,optionalAttributes:null,useComputeBuffer:!1},{painter:c,context:m}=e;c.submitDrawMesh(m,f,c.quadMesh)}}export{t as ShadedReliefTechnique};
