declare const _default: "\n #include \"tonemappingPS\"\n #include \"gammaPS\"\n\n varying vec2 uv0;\n uniform sampler2D sceneTexture;\n uniform vec2 sceneTextureInvRes;\n uniform float composeTargetFlipY;\n\n #include \"composeBloomPS\"\n #include \"composeDofPS\"\n #include \"composeSsaoPS\"\n #include \"composeGradingPS\"\n #include \"composeColorEnhancePS\"\n #include \"composeVignettePS\"\n #include \"composeFringingPS\"\n #include \"composeCasPS\"\n #include \"composeColorLutPS\"\n\n // The depth debug mode displays a depth some other pass in this frame has already produced - the\n // debug modes never turn any rendering on, so the mode is switched to depthmissing when nothing\n // did, see RenderPassCompose. That is also why this is included here rather than unconditionally:\n // declaring the depth sampler in a frame with no depth to bind to it is an error.\n #if DEBUG_COMPOSE == depth\n #include \"screenDepthPS\"\n #endif\n\n #include \"composeDeclarationsPS\"\n\n void main() {\n\n #include \"composeMainStartPS\"\n\n // flip the sampling vertically when the target render target stores a flipped image, so\n // that the natively-oriented output of the scene pass chain lands in the requested row order\n vec2 uv = vec2(uv0.x, mix(uv0.y, 1.0 - uv0.y, composeTargetFlipY));\n\n vec4 scene = texture2DLod(sceneTexture, uv, 0.0);\n vec3 result = scene.rgb;\n\n // Apply CAS\n #ifdef CAS\n result = applyCas(result, uv, sharpness);\n #endif\n\n // Apply DOF\n #ifdef DOF\n result = applyDof(result, uv);\n #endif\n\n // Apply SSAO\n #ifdef SSAO_TEXTURE\n result = applySsao(result, uv);\n #endif\n\n // Apply Fringing\n #ifdef FRINGING\n result = applyFringing(result, uv);\n #endif\n\n // Apply Bloom\n #ifdef BLOOM\n result = applyBloom(result, uv);\n #endif\n\n // Apply Color Enhancement (shadows, highlights, vibrance)\n #ifdef COLOR_ENHANCE\n result = applyColorEnhance(result);\n #endif\n\n // Apply Color Grading\n #ifdef GRADING\n result = applyGrading(result);\n #endif\n\n // Apply Tone Mapping\n result = toneMap(max(vec3(0.0), result));\n\n // Apply Color LUT after tone mapping, in LDR space\n #ifdef COLOR_LUT\n result = applyColorLUT(result);\n #endif\n\n // Apply Vignette\n #ifdef VIGNETTE\n result = applyVignette(result, uv);\n #endif\n\n #include \"composeMainEndPS\"\n\n // Debug output handling in one centralized location\n #ifdef DEBUG_COMPOSE\n #if DEBUG_COMPOSE == scene\n result = scene.rgb;\n #elif defined(BLOOM) && DEBUG_COMPOSE == bloom\n result = dBloom * bloomIntensity;\n #elif defined(DOF) && DEBUG_COMPOSE == dofcoc\n result = vec3(dCoc, 0.0);\n #elif defined(DOF) && DEBUG_COMPOSE == dofblur\n result = dBlur;\n #elif defined(SSAO_TEXTURE) && DEBUG_COMPOSE == ssao\n result = vec3(dSsao);\n #elif defined(VIGNETTE) && DEBUG_COMPOSE == vignette\n result = vec3(dVignette);\n #elif DEBUG_COMPOSE == depth\n // a linear ramp over the camera clip range\n float dDepth = getLinearScreenDepth(uv);\n result = vec3(clamp((dDepth - camera_params.z) / (camera_params.y - camera_params.z), 0.0, 1.0));\n #elif DEBUG_COMPOSE == depthmissing\n // the depth was asked for while nothing in this frame produces it\n result = vec3(0.0);\n #endif\n #endif\n\n // Apply gamma correction\n result = gammaCorrectOutput(result);\n\n gl_FragColor = vec4(result, scene.a);\n }\n"; export default _default;