uniform sampler2D postFX_sampler0;
uniform sampler2D postFX_sampler4;
uniform vec4 g_HalfPixel_ViewportSizeInv;
uniform float g_HDR_frameTime;
varying vec2 Tex;
void main ()
{
  vec4 new_ret_1;
  float _sum_2;
  float _max_3;
  vec4 tmpvar_4;
  tmpvar_4 = texture2D (postFX_sampler0, (Tex + (vec2(-1.5, -1.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (tmpvar_4.x * tmpvar_4.x);
  _max_3 = max (0.0, tmpvar_4.y);
  vec4 tmpvar_5;
  tmpvar_5 = texture2D (postFX_sampler0, (Tex + (vec2(-1.5, -0.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_5.x * tmpvar_5.x));
  _max_3 = max (_max_3, tmpvar_5.y);
  vec4 tmpvar_6;
  tmpvar_6 = texture2D (postFX_sampler0, (Tex + (vec2(-1.5, 0.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_6.x * tmpvar_6.x));
  _max_3 = max (_max_3, tmpvar_6.y);
  vec4 tmpvar_7;
  tmpvar_7 = texture2D (postFX_sampler0, (Tex + (vec2(-1.5, 1.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_7.x * tmpvar_7.x));
  _max_3 = max (_max_3, tmpvar_7.y);
  vec4 tmpvar_8;
  tmpvar_8 = texture2D (postFX_sampler0, (Tex + (vec2(-0.5, -1.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_8.x * tmpvar_8.x));
  _max_3 = max (_max_3, tmpvar_8.y);
  vec4 tmpvar_9;
  tmpvar_9 = texture2D (postFX_sampler0, (Tex + (vec2(-0.5, -0.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_9.x * tmpvar_9.x));
  _max_3 = max (_max_3, tmpvar_9.y);
  vec4 tmpvar_10;
  tmpvar_10 = texture2D (postFX_sampler0, (Tex + (vec2(-0.5, 0.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_10.x * tmpvar_10.x));
  _max_3 = max (_max_3, tmpvar_10.y);
  vec4 tmpvar_11;
  tmpvar_11 = texture2D (postFX_sampler0, (Tex + (vec2(-0.5, 1.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_11.x * tmpvar_11.x));
  _max_3 = max (_max_3, tmpvar_11.y);
  vec4 tmpvar_12;
  tmpvar_12 = texture2D (postFX_sampler0, (Tex + (vec2(0.5, -1.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_12.x * tmpvar_12.x));
  _max_3 = max (_max_3, tmpvar_12.y);
  vec4 tmpvar_13;
  tmpvar_13 = texture2D (postFX_sampler0, (Tex + (vec2(0.5, -0.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_13.x * tmpvar_13.x));
  _max_3 = max (_max_3, tmpvar_13.y);
  vec4 tmpvar_14;
  tmpvar_14 = texture2D (postFX_sampler0, (Tex + (vec2(0.5, 0.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_14.x * tmpvar_14.x));
  _max_3 = max (_max_3, tmpvar_14.y);
  vec4 tmpvar_15;
  tmpvar_15 = texture2D (postFX_sampler0, (Tex + (vec2(0.5, 1.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_15.x * tmpvar_15.x));
  _max_3 = max (_max_3, tmpvar_15.y);
  vec4 tmpvar_16;
  tmpvar_16 = texture2D (postFX_sampler0, (Tex + (vec2(1.5, -1.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_16.x * tmpvar_16.x));
  _max_3 = max (_max_3, tmpvar_16.y);
  vec4 tmpvar_17;
  tmpvar_17 = texture2D (postFX_sampler0, (Tex + (vec2(1.5, -0.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_17.x * tmpvar_17.x));
  _max_3 = max (_max_3, tmpvar_17.y);
  vec4 tmpvar_18;
  tmpvar_18 = texture2D (postFX_sampler0, (Tex + (vec2(1.5, 0.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_18.x * tmpvar_18.x));
  _max_3 = max (_max_3, tmpvar_18.y);
  vec4 tmpvar_19;
  tmpvar_19 = texture2D (postFX_sampler0, (Tex + (vec2(1.5, 1.5) * g_HalfPixel_ViewportSizeInv.yw)));
  _sum_2 = (_sum_2 + (tmpvar_19.x * tmpvar_19.x));
  _max_3 = max (_max_3, tmpvar_19.y);
  vec4 tmpvar_20;
  tmpvar_20.zw = vec2(0.0, 1.0);
  tmpvar_20.x = sqrt(max ((_sum_2 / 16.0), 0.001));
  tmpvar_20.y = _max_3;
  new_ret_1.zw = tmpvar_20.zw;
  vec2 tmpvar_21;
  tmpvar_21 = texture2D (postFX_sampler4, vec2(0.5, 0.5)).xy;
  new_ret_1.x = mix (tmpvar_21.x, tmpvar_20.x, g_HDR_frameTime);
  new_ret_1.y = max (0.1, mix (tmpvar_21.y, _max_3, g_HDR_frameTime));
  gl_FragColor = max (vec4(0.0, 0.0, 0.0, 0.0), new_ret_1);
}

