declare const _default: "\n varying uv0: vec2f;\n var smaaColorTexture: texture_2d;\n var smaaColorTextureSampler: sampler;\n\n // 1 / width, 1 / height, width, height of the scene\n uniform smaaMetrics: vec4f;\n\n // threshold, maximum search steps, maximum diagonal search steps, corner rounding\n uniform smaaParams: vec4f;\n\n // the exposure the scene is displayed with\n uniform smaaExposure: f32;\n\n // an edge much weaker than one next to it is not an edge of its own\n const SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR: f32 = 2.0;\n\n // The brightness of the scene as displayed. The scene is linear HDR, before the exposure and\n // the tone mapping, while the edge threshold applies to the brightness the eye perceives - so\n // the exposed luma is compressed by a Reinhard curve and gamma encoded, approximating the\n // displayed value whatever the tone mapping. It is premultiplied by the alpha, as the color of\n // a transparent pixel is not displayed.\n fn smaaLuma(uv: vec2f) -> f32 {\n let color = textureSampleLevel(smaaColorTexture, smaaColorTextureSampler, uv, 0.0);\n let luma = clamp(dot(color.rgb, vec3f(0.2126, 0.7152, 0.0722)) * (color.a * uniform.smaaExposure), 0.0, 1.0e4);\n return sqrt(luma / (1.0 + luma));\n }\n\n @fragment\n fn fragmentMain(input: FragmentInput) -> FragmentOutput {\n var output: FragmentOutput;\n let texel = uniform.smaaMetrics.xy;\n\n // the brightness differences to the left and the top neighbors\n let L = smaaLuma(uv0);\n let Lleft = smaaLuma(uv0 - vec2f(texel.x, 0.0));\n let Ltop = smaaLuma(uv0 - vec2f(0.0, texel.y));\n var delta = vec4f(abs(L - vec2f(Lleft, Ltop)), 0.0, 0.0);\n var edges = step(vec2f(uniform.smaaParams.x), delta.xy);\n\n // most pixels have no edge, and leave the cleared target as it is\n if (dot(edges, vec2f(1.0)) == 0.0) {\n discard;\n }\n\n // the differences to the right and the bottom neighbors\n let Lright = smaaLuma(uv0 + vec2f(texel.x, 0.0));\n let Lbottom = smaaLuma(uv0 + vec2f(0.0, texel.y));\n delta = vec4f(delta.xy, abs(L - vec2f(Lright, Lbottom)));\n var maxDelta = max(delta.xy, delta.zw);\n\n // the differences between the left and the left-left, and the top and the top-top\n let Lleftleft = smaaLuma(uv0 - vec2f(2.0 * texel.x, 0.0));\n let Ltoptop = smaaLuma(uv0 - vec2f(0.0, 2.0 * texel.y));\n delta = vec4f(delta.xy, abs(vec2f(Lleft, Ltop) - vec2f(Lleftleft, Ltoptop)));\n maxDelta = max(maxDelta.xy, delta.zw);\n let finalDelta = max(maxDelta.x, maxDelta.y);\n\n // local contrast adaptation\n edges = edges * step(vec2f(finalDelta), SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR * delta.xy);\n\n output.color = vec4f(edges, 0.0, 0.0);\n return output;\n }\n"; export default _default;