/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as r}from"tslib";import{uniform as o}from"../../../../GraphShaderModule.js";import{clamp as e,Float as t,Vec4 as i,Vec3 as s}from"../../../../graph/glsl.js";import{rgb2hsv as l,hsv2rgb as p}from"../colorConversion.js";import{lookupColor as a,ColormapConfig as m}from"../lut.js";import{HillshadeShader as n}from"./HillshadeShader.js";class d extends n{constructor(){super(...arguments),this.type="ShadedReliefShader"}_process(r){const o=super._process(r),{minValue:m,maxValue:n}=this.hillshadeConfig,d=this._getPixel(r),h=n.subtract(m),u=d.r.subtract(m),c=e(u.divide(h),new t(0),new t(1)),f=a(new i(c,c,c,1),new t(255),this.colormapConfig),x=l(f.xyz),g=p(new s(x.xy,o.x.divide(255))).multiply(255);return new i(g,f.a.multiply(o.a))}}r([o(m)],d.prototype,"colormapConfig",void 0);export{d as ShadedReliefShader};
