/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{HighlightCellGridScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js";import{HighlightReadBitmap as i}from"../views/3d/webgl-engine/core/shaderLibrary/HighlightReadBitmap.glsl.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DUintPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{ShaderBuilder as t}from"../views/webgl/ShaderBuilder.js";function s(){const s=new t;s.include(e),s.include(i);const{fragment:h}=s;return s.outputs.add("fragSingleHighlight","vec2",0),h.uniforms.add(new g("highlightTexture",e=>e.highlightTexture),new l("highlightLevel",e=>e.highlightLevel)),h.main.add(r`ivec2 iuv = ivec2(gl_FragCoord.xy);
uvec2 inputTexel = texelFetch(highlightTexture, iuv, 0).rg;
uint bits = readLevelBits(inputTexel, highlightLevel);
bool hasHighlight = (bits & 1u) == 1u;
bool hasOccluded  = (bits & 2u) == 2u;
fragSingleHighlight = vec2(hasHighlight ? 1.0 : 0.0, hasOccluded ? 1.0 : 0.0);`),s}const h=Object.freeze(Object.defineProperty({__proto__:null,build:s},Symbol.toStringTag,{value:"Module"}));export{h as H,s as b};
