declare const _default: "\n #include \"tonemappingPS\"\n #include \"gammaPS\"\n\n varying uv0: vec2f;\n var sceneTexture: texture_2d;\n var sceneTextureSampler: sampler;\n // the size of the scene texture: width, height, 1 / width, 1 / height\n uniform sceneTextureSize: vec4f;\n uniform composeTargetFlipY: f32;\n\n\n // The scene depth, for the depth debug mode and the effects requiring the depth. The debug mode\n // displays a depth some other pass in this frame has already produced - the debug modes never\n // turn any rendering on, so the mode is switched to depthmissing when nothing did, see\n // RenderPassCompose. That is also why this is included only when needed: declaring the depth\n // sampler in a frame with no depth to bind to it is an error.\n #ifdef COMPOSE_SCENE_DEPTH\n #include \"screenDepthPS\"\n #endif\n\n // declarations of the effects registered with the CameraFrame, assembled by RenderPassCompose\n #include \"composeEffectDeclarationsPS\"\n\n #include \"composeDeclarationsPS\"\n\n @fragment\n fn fragmentMain(input: FragmentInput) -> FragmentOutput {\n\n #include \"composeMainStartPS\"\n\n var output: FragmentOutput;\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 var uv = vec2f(uv0.x, mix(uv0.y, 1.0 - uv0.y, uniform.composeTargetFlipY));\n\n var scene = textureSampleLevel(sceneTexture, sceneTextureSampler, uv, 0.0);\n\n // COMPOSESLOT_SCENE effects - operate on the sampled scene color including its alpha\n #include \"composeSlotSceneCallPS, COMPOSE_SCENE_COUNT\"\n\n var result = scene.rgb;\n\n // COMPOSESLOT_HDR effects - linear, scene-referred color\n #include \"composeSlotHdrCallPS, COMPOSE_HDR_COUNT\"\n\n // Apply Tone Mapping\n result = toneMap(max(vec3f(0.0), result));\n\n // COMPOSESLOT_LDR effects - display-referred color, before gamma correction\n #include \"composeSlotLdrCallPS, COMPOSE_LDR_COUNT\"\n\n #include \"composeMainEndPS\"\n\n // Debug output handling in one centralized location\n #ifdef DEBUG_COMPOSE\n #if DEBUG_COMPOSE == scene\n // the scene texture itself, before any effect, those at COMPOSESLOT_SCENE included\n result = textureSampleLevel(sceneTexture, sceneTextureSampler, uv, 0.0).rgb;\n #elif DEBUG_COMPOSE == depth\n // a linear ramp over the camera clip range\n let dDepth = getLinearScreenDepth(uv);\n result = vec3f(clamp((dDepth - uniform.camera_params.z) / (uniform.camera_params.y - uniform.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 = vec3f(0.0);\n #endif\n\n // the debug view of the registered effect providing the active one, selected by\n // RenderPassCompose through the COMPOSE_EFFECT_DEBUG define\n #include \"composeEffectDebugPS\"\n #endif\n\n // Apply gamma correction\n result = gammaCorrectOutput(result);\n\n // COMPOSESLOT_OUTPUT effects - final output values, after gamma correction\n #include \"composeSlotOutputCallPS, COMPOSE_OUTPUT_COUNT\"\n\n output.color = vec4f(result, scene.a);\n return output;\n }\n"; export default _default;