declare const _default: "\n\n#if LIGHT_TYPE != DIRECTIONAL\n uniform vec3 view_position;\n uniform float light_radius;\n#endif\n\n#if SHADOW_TYPE == PCSS_32F\n #include \"linearizeDepthPS\"\n#endif\n\n#if SHADOW_TYPE == VSM_16F || SHADOW_TYPE == VSM_32F\n #include \"shadowEVSMExponentPS\"\n#endif\n\nvoid main(void) {\n\n #ifdef CLIP_PLANES\n applyClipPlanes(vPositionW);\n #endif\n\n #include \"litUserMainStartPS\"\n\n evaluateFrontend();\n\n // using non-standard depth, i.e gl_FragCoord.z\n #ifdef PERSPECTIVE_DEPTH\n float depth = gl_FragCoord.z;\n\n #if SHADOW_TYPE == PCSS_32F\n // spot/omni shadows currently use linear depth.\n // TODO: use perspective depth for spot/omni the same way as directional\n #if LIGHT_TYPE != DIRECTIONAL\n depth = linearizeDepthWithParams(depth, camera_params);\n #endif\n #endif\n\n #else\n float depth = min(distance(view_position, vPositionW) / light_radius, 0.99999);\n #define MODIFIED_DEPTH\n #endif\n\n #if SHADOW_TYPE == VSM_16F || SHADOW_TYPE == VSM_32F\n\n // Rasterization of degenerate triangles, which animated meshes can generate, can supply\n // depth outside of the [0, 1] range or even NaN. The exponential warp below turns those\n // into huge values, which the VSM blur then spreads over a large area, generating visible\n // artifacts. Note that the depth range is not clipped for other shadow types, as they\n // either store the depth using the depth buffer, which clamps it, or the error is limited\n // to the individual texels and so is not noticeable.\n if (!(depth >= 0.0 && depth <= 1.0)) discard;\n\n #if SHADOW_TYPE == VSM_32F\n float exponent = VSM_EXPONENT_32F;\n #else\n float exponent = VSM_EXPONENT_16F;\n #endif\n depth = 2.0 * depth - 1.0;\n depth = exp(exponent * depth);\n gl_FragColor = vec4(depth, depth*depth, 1.0, 1.0);\n #else\n #if SHADOW_TYPE == PCSS_32F\n // store depth into R32\n gl_FragColor.r = depth;\n #else\n #ifdef MODIFIED_DEPTH\n // If we end up using modified depth, it needs to be explicitly written to gl_FragDepth\n gl_FragDepth = depth;\n #endif\n\n // just the simplest code, color is not written anyway\n gl_FragColor = vec4(1.0);\n #endif\n #endif\n\n #include \"litUserMainEndPS\"\n}\n"; export default _default;