export declare const dim_frag = "\nprecision highp float;\nprecision highp sampler2D;\n\nuniform sampler2D tDepthTexture;\nuniform sampler2D tMaskTexture;\nuniform vec2 uTexSizeInv;\nuniform float uIsOrtho;\nuniform float uNear;\nuniform float uFar;\nuniform float uFogNear;\nuniform float uFogFar;\n\n#include common\n\nvoid main() {\n vec2 coords = gl_FragCoord.xy * uTexSizeInv;\n\n // depth of the front-most unmarked fragment, cleared to 1.0 in every channel where there is none\n vec4 packedDepth = texture2D(tDepthTexture, coords);\n if (packedDepth == vec4(1.0))\n discard;\n\n // mask values are 0.0 where marked, green is 0.0 where the marked fragment is in front\n vec4 m = texture2D(tMaskTexture, coords);\n if (m.r < 0.5 && m.g < 0.5)\n discard;\n\n vec2 depthWithAlpha = unpackRGBAToDepthWithAlpha(packedDepth);\n float viewZ = depthToViewZ(uIsOrtho, depthWithAlpha.x, uNear, uFar);\n float fogAlpha = 1.0 - smoothstep(uFogNear, uFogFar, abs(viewZ));\n // after antialiasing: r = coverage * opacity * fogAlpha, g = coverage * opacity\n gl_FragColor = vec4(fogAlpha * depthWithAlpha.y, depthWithAlpha.y, 0.0, 1.0);\n}\n";