/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as r}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";function t(t){const o=new n;return o.include(e),o.fragment.uniforms.add(new r("densityMap",e=>e.densityMap),new r("tex",e=>e.colorRamp),new i("densityNormalizer",e=>1/(e.maxDensity-e.minDensity)),new i("minDensity",e=>e.minDensity),new i("densityMultiplier",e=>3/(e.searchRadius*e.searchRadius*Math.PI)*(t.usesHalfFloat?4:1))).main.add(s`float density = texture(densityMap, uv).r * densityMultiplier;
float densityRatio = (density - minDensity) * densityNormalizer;
fragColor = texture(tex, vec2(clamp(densityRatio, 0.0, 1.0), 0.5));`),o}const o=Object.freeze(Object.defineProperty({__proto__:null,build:t},Symbol.toStringTag,{value:"Module"}));export{o as H,t as b};
