/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as o}from"tslib";import{uniform as r,texture as e}from"../../../../GraphShaderModule.js";import{clamp as t,Float as s,Vec4 as i,Vec3 as p}from"../../../../graph/glsl.js";import{rgb2hsv as l,hsv2rgb as a}from"../colorConversion.js";import{lookupColor as m,ColormapConfig as n,ColormapTextures as d}from"../lut.js";import{HillshadeShader as h}from"./HillshadeShader.js";class u extends h{constructor(){super(...arguments),this.type="ShadedReliefShader"}_process(o){const r=super._process(o),{minValue:e,maxValue:n}=this.hillshadeConfig,d=this._getPixel(o),h=n.subtract(e),u=d.r.subtract(e),c=t(u.divide(h),new s(0),new s(1)),f=m(new i(c,c,c,1),new s(255),this.colormapConfig,this.colormapTextures),x=l(f.xyz),y=a(new p(x.xy,r.x.divide(255))).multiply(255);return new i(y,f.a.multiply(r.a))}}o([r(n)],u.prototype,"colormapConfig",void 0),o([e(d)],u.prototype,"colormapTextures",void 0);export{u as ShadedReliefShader};
