declare const _default: "\n varying vec2 uv0;\n uniform sampler2D smaaColorTexture;\n\n // 1 / width, 1 / height, width, height of the scene\n uniform vec4 smaaMetrics;\n\n // threshold, maximum search steps, maximum diagonal search steps, corner rounding\n uniform vec4 smaaParams;\n\n // the exposure the scene is displayed with\n uniform float smaaExposure;\n\n // an edge much weaker than one next to it is not an edge of its own\n #define SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR 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 float smaaLuma(vec2 uv) {\n vec4 color = texture2DLod(smaaColorTexture, uv, 0.0);\n float luma = clamp(dot(color.rgb, vec3(0.2126, 0.7152, 0.0722)) * (color.a * smaaExposure), 0.0, 1.0e4);\n return sqrt(luma / (1.0 + luma));\n }\n\n void main(void) {\n vec2 texel = smaaMetrics.xy;\n\n // the brightness differences to the left and the top neighbors\n float L = smaaLuma(uv0);\n float Lleft = smaaLuma(uv0 - vec2(texel.x, 0.0));\n float Ltop = smaaLuma(uv0 - vec2(0.0, texel.y));\n vec4 delta;\n delta.xy = abs(L - vec2(Lleft, Ltop));\n vec2 edges = step(vec2(smaaParams.x), delta.xy);\n\n // most pixels have no edge, and leave the cleared target as it is\n if (dot(edges, vec2(1.0)) == 0.0) {\n discard;\n }\n\n // the differences to the right and the bottom neighbors\n float Lright = smaaLuma(uv0 + vec2(texel.x, 0.0));\n float Lbottom = smaaLuma(uv0 + vec2(0.0, texel.y));\n delta.zw = abs(L - vec2(Lright, Lbottom));\n vec2 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 float Lleftleft = smaaLuma(uv0 - vec2(2.0 * texel.x, 0.0));\n float Ltoptop = smaaLuma(uv0 - vec2(0.0, 2.0 * texel.y));\n delta.zw = abs(vec2(Lleft, Ltop) - vec2(Lleftleft, Ltoptop));\n maxDelta = max(maxDelta.xy, delta.zw);\n float finalDelta = max(maxDelta.x, maxDelta.y);\n\n // local contrast adaptation\n edges.xy *= step(finalDelta, SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR * delta.xy);\n\n gl_FragColor = vec4(edges, 0.0, 0.0);\n }\n"; export default _default;