bgfx/3rdparty/glsl-optimizer/tests/fragment/zunity-MotionBlur-TileMax-ir.txt

118 lines
2.3 KiB
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
struct v2f {
vec4 pos;
vec2 uv;
};
varying vec2 xlv_TEXCOORD0;
uniform vec4 _MainTex_TexelSize;
uniform sampler2D _MainTex;
vec2 maxMag (
in vec2 a_1,
in vec2 b_2
)
{
float mb_3;
float ma_4;
float tmpvar_5;
tmpvar_5 = dot (a_1, a_1);
float tmpvar_6;
tmpvar_6 = tmpvar_5;
ma_4 = tmpvar_6;
float tmpvar_7;
tmpvar_7 = dot (b_2, b_2);
float tmpvar_8;
tmpvar_8 = tmpvar_7;
mb_3 = tmpvar_8;
float tmpvar_9;
tmpvar_9 = step (ma_4, mb_3);
vec2 tmpvar_10;
tmpvar_10 = vec2(tmpvar_9);
vec2 tmpvar_11;
tmpvar_11 = mix (a_1, b_2, tmpvar_10);
return tmpvar_11;
}
vec4 TileMax (
in v2f i_12
)
{
int j_13;
vec2 v_14;
vec2 mx_15;
vec2 uvCorner_16;
vec2 tmpvar_17;
tmpvar_17 = i_12.uv;
uvCorner_16 = tmpvar_17;
vec4 tmpvar_18;
tmpvar_18 = texture2D (_MainTex, uvCorner_16);
vec2 tmpvar_19;
tmpvar_19 = tmpvar_18.xy;
vec2 tmpvar_20;
tmpvar_20 = tmpvar_19;
mx_15 = tmpvar_20;
int tmpvar_21;
tmpvar_21 = 0;
j_13 = tmpvar_21;
while (true) {
int l_22;
if (!((j_13 < 8))) {
break;
};
int tmpvar_23;
tmpvar_23 = 0;
l_22 = tmpvar_23;
while (true) {
if (!((l_22 < 8))) {
break;
};
vec2 tmpvar_24;
tmpvar_24.x = float(l_22);
tmpvar_24.y = float(j_13);
vec4 tmpvar_25;
tmpvar_25 = texture2D (_MainTex, (uvCorner_16 + (tmpvar_24 * _MainTex_TexelSize.xy)));
vec2 tmpvar_26;
tmpvar_26 = tmpvar_25.xy;
v_14 = tmpvar_26;
vec2 tmpvar_27;
tmpvar_27 = maxMag (mx_15, v_14);
vec2 tmpvar_28;
tmpvar_28 = tmpvar_27;
mx_15 = tmpvar_28;
int _post_incdec_tmp_29;
_post_incdec_tmp_29 = l_22;
int tmpvar_30;
tmpvar_30 = (l_22 + 1);
l_22 = tmpvar_30;
};
int _post_incdec_tmp_31;
_post_incdec_tmp_31 = j_13;
int tmpvar_32;
tmpvar_32 = (j_13 + 1);
j_13 = tmpvar_32;
};
vec4 tmpvar_33;
tmpvar_33.zw = vec2(0.0, 0.0);
tmpvar_33.xy = mx_15.xy;
return tmpvar_33;
}
void main ()
{
v2f ii_34;
vec4 c_35;
vec4 tmpvar_36;
tmpvar_36 = vec4(0.0, 0.0, 0.0, 0.0);
ii_34.pos = tmpvar_36;
vec2 tmpvar_37;
tmpvar_37 = xlv_TEXCOORD0;
ii_34.uv = tmpvar_37;
vec4 tmpvar_38;
tmpvar_38 = TileMax (ii_34);
vec4 tmpvar_39;
tmpvar_39 = tmpvar_38;
c_35 = tmpvar_39;
vec4 tmpvar_40;
tmpvar_40 = c_35;
gl_FragData[0] = tmpvar_40;
}