2012-10-07 23:41:18 -04:00
|
|
|
#extension GL_EXT_shader_texture_lod : enable
|
|
|
|
uniform sampler2D _MainTex;
|
2014-02-11 02:06:13 -05:00
|
|
|
uniform highp vec4 _MainTex_TexelSize;
|
|
|
|
varying highp vec2 xlv_TEXCOORD0;
|
|
|
|
varying highp vec4 xlv_TEXCOORD1;
|
2012-10-07 23:41:18 -04:00
|
|
|
void main ()
|
|
|
|
{
|
|
|
|
highp vec4 fxaaConsoleRcpFrameOpt_1;
|
|
|
|
fxaaConsoleRcpFrameOpt_1 = (_MainTex_TexelSize.xyxy * vec4(-0.5, -0.5, 0.5, 0.5));
|
|
|
|
highp vec4 fxaaConsoleRcpFrameOpt2_2;
|
|
|
|
fxaaConsoleRcpFrameOpt2_2 = (_MainTex_TexelSize.xyxy * vec4(-2.0, -2.0, 2.0, 2.0));
|
|
|
|
lowp vec4 tmpvar_3;
|
|
|
|
lowp vec4 rgbyB_4;
|
2014-10-11 15:32:43 -04:00
|
|
|
lowp vec4 rgbyA_5;
|
|
|
|
highp vec2 dir_6;
|
|
|
|
highp float dirSeMinusNw_7;
|
|
|
|
highp float lumaMaxSubMinM_8;
|
|
|
|
highp float dirSwMinusNe_9;
|
|
|
|
highp float lumaM_10;
|
|
|
|
highp float lumaNe_11;
|
|
|
|
lowp vec4 tmpvar_12;
|
|
|
|
tmpvar_12 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.xy, 0.0);
|
|
|
|
highp float tmpvar_13;
|
|
|
|
tmpvar_13 = tmpvar_12.y;
|
|
|
|
lowp vec4 tmpvar_14;
|
|
|
|
tmpvar_14 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.xw, 0.0);
|
|
|
|
highp float tmpvar_15;
|
|
|
|
tmpvar_15 = tmpvar_14.y;
|
|
|
|
lowp vec4 tmpvar_16;
|
|
|
|
tmpvar_16 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.zy, 0.0);
|
2012-10-07 23:41:18 -04:00
|
|
|
highp float tmpvar_17;
|
2014-10-11 15:32:43 -04:00
|
|
|
tmpvar_17 = tmpvar_16.y;
|
|
|
|
lowp vec4 tmpvar_18;
|
|
|
|
tmpvar_18 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.zw, 0.0);
|
2012-10-07 23:41:18 -04:00
|
|
|
highp float tmpvar_19;
|
2014-10-11 15:32:43 -04:00
|
|
|
tmpvar_19 = tmpvar_18.y;
|
|
|
|
lowp vec4 tmpvar_20;
|
|
|
|
tmpvar_20 = texture2DLodEXT (_MainTex, xlv_TEXCOORD0, 0.0);
|
|
|
|
lumaM_10 = tmpvar_20.y;
|
|
|
|
lumaNe_11 = (tmpvar_17 + 0.00260417);
|
2012-10-07 23:41:18 -04:00
|
|
|
highp float tmpvar_21;
|
2014-10-11 15:32:43 -04:00
|
|
|
tmpvar_21 = max (max (lumaNe_11, tmpvar_19), max (tmpvar_13, tmpvar_15));
|
2012-10-07 23:41:18 -04:00
|
|
|
highp float tmpvar_22;
|
2014-10-11 15:32:43 -04:00
|
|
|
tmpvar_22 = min (min (lumaNe_11, tmpvar_19), min (tmpvar_13, tmpvar_15));
|
2012-10-07 23:41:18 -04:00
|
|
|
highp float tmpvar_23;
|
2014-10-11 15:32:43 -04:00
|
|
|
tmpvar_23 = max (0.05, (tmpvar_21 * 0.125));
|
|
|
|
dirSwMinusNe_9 = (tmpvar_15 - lumaNe_11);
|
|
|
|
lumaMaxSubMinM_8 = (max (tmpvar_21, lumaM_10) - min (tmpvar_22, lumaM_10));
|
|
|
|
dirSeMinusNw_7 = (tmpvar_19 - tmpvar_13);
|
|
|
|
if ((lumaMaxSubMinM_8 < tmpvar_23)) {
|
|
|
|
tmpvar_3 = tmpvar_20;
|
2012-10-07 23:41:18 -04:00
|
|
|
} else {
|
2014-10-11 15:32:43 -04:00
|
|
|
dir_6.x = (dirSwMinusNe_9 + dirSeMinusNw_7);
|
|
|
|
dir_6.y = (dirSwMinusNe_9 - dirSeMinusNw_7);
|
2012-10-07 23:41:18 -04:00
|
|
|
highp vec2 tmpvar_24;
|
2014-10-11 15:32:43 -04:00
|
|
|
tmpvar_24 = normalize(dir_6);
|
2012-10-07 23:41:18 -04:00
|
|
|
highp vec4 tmpvar_25;
|
|
|
|
tmpvar_25.zw = vec2(0.0, 0.0);
|
|
|
|
tmpvar_25.xy = (xlv_TEXCOORD0 - (tmpvar_24 * fxaaConsoleRcpFrameOpt_1.zw));
|
|
|
|
highp vec4 tmpvar_26;
|
|
|
|
tmpvar_26.zw = vec2(0.0, 0.0);
|
|
|
|
tmpvar_26.xy = (xlv_TEXCOORD0 + (tmpvar_24 * fxaaConsoleRcpFrameOpt_1.zw));
|
|
|
|
highp vec2 tmpvar_27;
|
2014-02-11 02:06:13 -05:00
|
|
|
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));
|
2012-10-07 23:41:18 -04:00
|
|
|
highp vec4 tmpvar_28;
|
|
|
|
tmpvar_28.zw = vec2(0.0, 0.0);
|
|
|
|
tmpvar_28.xy = (xlv_TEXCOORD0 - (tmpvar_27 * fxaaConsoleRcpFrameOpt2_2.zw));
|
|
|
|
highp vec4 tmpvar_29;
|
|
|
|
tmpvar_29.zw = vec2(0.0, 0.0);
|
|
|
|
tmpvar_29.xy = (xlv_TEXCOORD0 + (tmpvar_27 * fxaaConsoleRcpFrameOpt2_2.zw));
|
2014-10-11 15:32:43 -04:00
|
|
|
rgbyA_5 = (texture2DLodEXT (_MainTex, tmpvar_25.xy, 0.0) + texture2DLodEXT (_MainTex, tmpvar_26.xy, 0.0));
|
|
|
|
rgbyB_4 = (((texture2DLodEXT (_MainTex, tmpvar_28.xy, 0.0) + texture2DLodEXT (_MainTex, tmpvar_29.xy, 0.0)) * 0.25) + (rgbyA_5 * 0.25));
|
|
|
|
if (((rgbyB_4.y < tmpvar_22) || (rgbyB_4.y > tmpvar_21))) {
|
|
|
|
rgbyB_4.xyz = (rgbyA_5.xyz * 0.5);
|
2012-10-07 23:41:18 -04:00
|
|
|
};
|
|
|
|
tmpvar_3 = rgbyB_4;
|
|
|
|
};
|
|
|
|
gl_FragData[0] = tmpvar_3;
|
|
|
|
}
|
|
|
|
|
2014-02-11 02:06:13 -05:00
|
|
|
|
2014-10-11 15:32:43 -04:00
|
|
|
// stats: 47 alu 9 tex 2 flow
|
|
|
|
// inputs: 2
|
|
|
|
// #0: xlv_TEXCOORD0 (high float) 2x1 [-1]
|
|
|
|
// #1: xlv_TEXCOORD1 (high float) 4x1 [-1]
|
|
|
|
// uniforms: 1 (total size: 0)
|
|
|
|
// #0: _MainTex_TexelSize (high float) 4x1 [-1]
|
|
|
|
// textures: 1
|
|
|
|
// #0: _MainTex (low 2d) 0x0 [-1]
|