/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../../../chunks/_rollupPluginBabelHelpers","../../../../../../chunks/vec2f64","../../../../../../chunks/vec4f64","../../shaderModules/Float2PassUniform","../../shaderModules/interfaces","../../shaderModules/Texture2DPassUniform"],(function(e,t,i,o,r,l,g){"use strict";const a=o.fromValues(1,1,0,1),s=o.fromValues(1,0,1,1);function n(e){e.fragment.uniforms.add(new g.Texture2DPassUniform("depthTex",((e,t)=>t.highlightDepthTexture))),e.fragment.uniforms.add(new r.Float2PassUniform("highlightViewportPixelSz",((e,t)=>t.inverseViewport))),e.fragment.constants.add("occludedHighlightFlag","vec4",a).add("unoccludedHighlightFlag","vec4",s),e.fragment.code.add(l.glsl`void outputHighlight() {
vec4 fragCoord = gl_FragCoord;
float sceneDepth = texture2D(depthTex, fragCoord.xy * highlightViewportPixelSz.xy).r;
if (fragCoord.z > sceneDepth + 5e-7) {
gl_FragColor = occludedHighlightFlag;
}
else {
gl_FragColor = unoccludedHighlightFlag;
}
}`)}let u=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).inverseViewport=i.create(),t}return t._inheritsLoose(o,e),o}(l.NoParameters);e.OutputHighlight=n,e.OutputHighlightUniforms=u,e.occludedHighlightFlag=a,e.unoccludedHighlightFlag=s,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
