/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{BaseRasterProcessorTechnique as e}from"./BaseRasterProcessorTechnique.js";import{computeZFactor as s}from"../../shaders/raster/surface.js";import{HillshadeShader as r}from"../../shaders/raster/processor/HillshadeShader.js";class t extends e{constructor(){super(...arguments),this.name="RasterHillshadeProcessor",this.type=14,this.shaders={hillshade:new r}}_process(e,r){const t=e.rasterFunction.parameters,a={isMultidirectional:t.hillshadeType>0},i=r.getRasterCellSize(),o=s(t,i),h={...t,factor:o,minValue:0,maxValue:8e3},{config:l,textures:n}=this._getCommonConfig(e,r),u={shader:this.shaders.hillshade,uniforms:{config:l,hillshadeConfig:h},textures:n,defines:a,optionalAttributes:null,useComputeBuffer:!1},{painter:c,context:d}=e;c.submitDrawMesh(d,u,c.quadMesh)}}export{t as HillshadeTechnique};
