#extension GL_EXT_shader_texture_lod : enable
varying highp vec4 xlv_TEXCOORD1;
varying highp vec2 xlv_TEXCOORD0;
uniform highp vec4 _MainTex_TexelSize;
uniform sampler2D _MainTex;
void main ()
{
  highp vec4 fxaaConsoleRcpFrameOpt;
  fxaaConsoleRcpFrameOpt = (_MainTex_TexelSize.xyxy * vec4(-0.5, -0.5, 0.5, 0.5));
  highp vec4 fxaaConsoleRcpFrameOpt2;
  fxaaConsoleRcpFrameOpt2 = (_MainTex_TexelSize.xyxy * vec4(-2.0, -2.0, 2.0, 2.0));
  lowp vec4 tmpvar_1;
  lowp vec4 rgbyB;
  highp vec2 dir;
  highp float lumaM;
  highp vec4 tmpvar_2;
  tmpvar_2.zw = vec2(0.0, 0.0);
  tmpvar_2.xy = xlv_TEXCOORD1.xy;
  lowp vec4 tmpvar_3;
  tmpvar_3 = texture2DLodEXT (_MainTex, tmpvar_2.xy, 0.0);
  highp float tmpvar_4;
  tmpvar_4 = tmpvar_3.y;
  highp vec4 tmpvar_5;
  tmpvar_5.zw = vec2(0.0, 0.0);
  tmpvar_5.xy = xlv_TEXCOORD1.xw;
  lowp vec4 tmpvar_6;
  tmpvar_6 = texture2DLodEXT (_MainTex, tmpvar_5.xy, 0.0);
  highp float tmpvar_7;
  tmpvar_7 = tmpvar_6.y;
  highp vec4 tmpvar_8;
  tmpvar_8.zw = vec2(0.0, 0.0);
  tmpvar_8.xy = xlv_TEXCOORD1.zy;
  lowp vec4 tmpvar_9;
  tmpvar_9 = texture2DLodEXT (_MainTex, tmpvar_8.xy, 0.0);
  highp float tmpvar_10;
  tmpvar_10 = tmpvar_9.y;
  highp vec4 tmpvar_11;
  tmpvar_11.zw = vec2(0.0, 0.0);
  tmpvar_11.xy = xlv_TEXCOORD1.zw;
  lowp vec4 tmpvar_12;
  tmpvar_12 = texture2DLodEXT (_MainTex, tmpvar_11.xy, 0.0);
  highp float tmpvar_13;
  tmpvar_13 = tmpvar_12.y;
  highp vec4 tmpvar_14;
  tmpvar_14.zw = vec2(0.0, 0.0);
  tmpvar_14.xy = xlv_TEXCOORD0;
  lowp vec4 tmpvar_15;
  tmpvar_15 = texture2DLodEXT (_MainTex, tmpvar_14.xy, 0.0);
  lowp float tmpvar_16;
  tmpvar_16 = tmpvar_15.y;
  lumaM = tmpvar_16;
  highp float tmpvar_17;
  tmpvar_17 = (tmpvar_10 + 0.00260417);
  highp float tmpvar_18;
  tmpvar_18 = max (max (tmpvar_17, tmpvar_13), max (tmpvar_4, tmpvar_7));
  highp float tmpvar_19;
  tmpvar_19 = min (min (tmpvar_17, tmpvar_13), min (tmpvar_4, tmpvar_7));
  highp float tmpvar_20;
  tmpvar_20 = max (0.05, (tmpvar_18 * 0.125));
  highp float tmpvar_21;
  tmpvar_21 = (tmpvar_7 - tmpvar_17);
  highp float tmpvar_22;
  tmpvar_22 = (max (tmpvar_18, lumaM) - min (tmpvar_19, lumaM));
  highp float tmpvar_23;
  tmpvar_23 = (tmpvar_13 - tmpvar_4);
  if ((tmpvar_22 < tmpvar_20)) {
    tmpvar_1 = tmpvar_15;
  } else {
    dir.x = (tmpvar_21 + tmpvar_23);
    dir.y = (tmpvar_21 - tmpvar_23);
    highp vec2 tmpvar_24;
    tmpvar_24 = normalize (dir);
    highp vec4 tmpvar_25;
    tmpvar_25.zw = vec2(0.0, 0.0);
    tmpvar_25.xy = (xlv_TEXCOORD0 - (tmpvar_24 * fxaaConsoleRcpFrameOpt.zw));
    highp vec4 tmpvar_26;
    tmpvar_26.zw = vec2(0.0, 0.0);
    tmpvar_26.xy = (xlv_TEXCOORD0 + (tmpvar_24 * fxaaConsoleRcpFrameOpt.zw));
    highp vec2 tmpvar_27;
    tmpvar_27 = clamp ((tmpvar_24 / (min (abs (tmpvar_24.x), abs (tmpvar_24.y)) * 8.0)), vec2(-2.0, -2.0), vec2(2.0, 2.0));
    highp vec4 tmpvar_28;
    tmpvar_28.zw = vec2(0.0, 0.0);
    tmpvar_28.xy = (xlv_TEXCOORD0 - (tmpvar_27 * fxaaConsoleRcpFrameOpt2.zw));
    highp vec4 tmpvar_29;
    tmpvar_29.zw = vec2(0.0, 0.0);
    tmpvar_29.xy = (xlv_TEXCOORD0 + (tmpvar_27 * fxaaConsoleRcpFrameOpt2.zw));
    lowp vec4 tmpvar_30;
    tmpvar_30 = (texture2DLodEXT (_MainTex, tmpvar_25.xy, 0.0) + texture2DLodEXT (_MainTex, tmpvar_26.xy, 0.0));
    lowp vec4 tmpvar_31;
    tmpvar_31 = (((texture2DLodEXT (_MainTex, tmpvar_28.xy, 0.0) + texture2DLodEXT (_MainTex, tmpvar_29.xy, 0.0)) * 0.25) + (tmpvar_30 * 0.25));
    rgbyB = tmpvar_31;
    bool tmpvar_32;
    if ((tmpvar_31.y < tmpvar_19)) {
      tmpvar_32 = bool(1);
    } else {
      tmpvar_32 = (tmpvar_31.y > tmpvar_18);
    };
    if (tmpvar_32) {
      rgbyB.xyz = (tmpvar_30.xyz * 0.5);
    };
    tmpvar_1 = rgbyB;
  };
  gl_FragData[0] = tmpvar_1;
}

