/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as o}from"../views/webgl/NoParameters.js";import{ShaderBuilder as r}from"../views/webgl/ShaderBuilder.js";class a extends o{}function n(){const o=new r;o.include(e);return o.fragment.uniforms.add(new s("splatOutputDepth",e=>e.splatDepth)),o.fragment.code.add("\n      // we encode near F32 precision by using two F16s  \n      float decodeVec2F16ToFloat32(vec2 encoded) {\n        return( (encoded.x + encoded.y) / 1024.0);\n      }\n  "),o.fragment.main.add(t`vec4 splatDepth = texture(splatOutputDepth, uv);
float ndcDepth = decodeVec2F16ToFloat32(splatDepth.xy);
if(splatDepth.a < 1.0) {
discard;
}
gl_FragDepth = (ndcDepth + 1.0) * 0.5;`),o}const d=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatDepthCompositionPassParameters:a,build:n},Symbol.toStringTag,{value:"Module"}));export{a as G,d as S,n as b};
