/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{calculateUVZShadowFromDepthPass as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js";import{ShadowmapFiltering as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js";import{glsl as o}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DShadowBindUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DShadowBindUniform.js";import{ShaderBuilder as t}from"../views/webgl/ShaderBuilder.js";function s(){const s=new t;return s.include(e),s.include(a),s.fragment.include(r),s.outputs.add("fragShadow","float"),s.fragment.uniforms.add(new i("shadowMapHighlight",({shadowMap:e})=>e.getOutput(6)),new d("depthMap",e=>e.depth?.attachment)).main.add(o`fragShadow = 0.0;
vec3 uvzShadow = calculateUVZShadowFromDepth(uv, textureSize(shadowMapHighlight, 0), depthMap);
if (uvzShadow.z >= 0.0) {
fragShadow = readShadowMapUVZ(uvzShadow, shadowMapHighlight);
}`),s}const n=Object.freeze(Object.defineProperty({__proto__:null,build:s},Symbol.toStringTag,{value:"Module"}));export{n as S,s as b};
