declare const _default: "\n #include \"screenDepthPS\"\n #include \"floatAsUintPS\"\n\n // the region of the view to sample, normalized, and the number of samples across and down it\n uniform vec4 uDepthReadRect;\n uniform vec2 uDepthReadGrid;\n\n // at or beyond this depth nothing was rendered, and the sample is reported as the value below.\n // Infinity arrives as a uniform rather than being written here, as WGSL rejects one written as a\n // constant expression, and both languages are kept the same.\n uniform float uDepthReadFar;\n uniform float uDepthReadEmpty;\n\n void main() {\n\n // the center of this output pixel, as a fraction of the region\n vec2 cell = (floor(gl_FragCoord.xy) + 0.5) / uDepthReadGrid;\n\n // The region is given with its origin in the bottom left, as the camera's own rect is, while\n // the depth is addressed however the API stores it - so the same conversion every other image\n // effect makes. Without it the region read is the one mirrored about the middle of the view.\n vec2 uv = getImageEffectUV(uDepthReadRect.xy + cell * uDepthReadRect.zw);\n\n // snap to the center of the nearest depth texel. Depth cannot be filtered - the average of a\n // near and a far surface unprojects to empty space - and sampling a texel center is what makes\n // the linear sampler of the unpacked formats return that texel exactly.\n vec2 size = vec2(textureSize(uSceneDepthMap, 0));\n uv = (floor(uv * size) + 0.5) / size;\n\n float depth = getLinearScreenDepth(uv);\n gl_FragColor = float2uint(depth >= uDepthReadFar ? uDepthReadEmpty : depth);\n }\n"; export default _default;