bgfx/3rdparty/glsl-optimizer/tests/fragment/intrinsics-outES.txt

105 lines
2.5 KiB
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
varying highp vec4 xlv_TEXCOORD0;
void main ()
{
mediump vec4 c;
c = vec4(0.0, 0.0, 0.0, 0.0);
float tmpvar_1;
tmpvar_1 = (xlv_TEXCOORD0.x / 2.0);
float tmpvar_2;
tmpvar_2 = (fract (abs (tmpvar_1)) * 2.0);
float tmpvar_3;
if ((tmpvar_1 >= 0.0)) {
tmpvar_3 = tmpvar_2;
} else {
tmpvar_3 = -(tmpvar_2);
};
c.x = tmpvar_3;
vec2 tmpvar_4;
tmpvar_4 = (xlv_TEXCOORD0.xy / vec2(2.0, 2.0));
vec2 tmpvar_5;
tmpvar_5 = (fract (abs (tmpvar_4)) * vec2(2.0, 2.0));
float tmpvar_6;
if ((tmpvar_4.x >= 0.0)) {
tmpvar_6 = tmpvar_5.x;
} else {
tmpvar_6 = -(tmpvar_5.x);
};
float tmpvar_7;
if ((tmpvar_4.y >= 0.0)) {
tmpvar_7 = tmpvar_5.y;
} else {
tmpvar_7 = -(tmpvar_5.y);
};
vec2 tmpvar_8;
tmpvar_8.x = tmpvar_6;
tmpvar_8.y = tmpvar_7;
c.xy = (c.xy + tmpvar_8);
vec3 tmpvar_9;
tmpvar_9 = (xlv_TEXCOORD0.xyz / vec3(2.0, 2.0, 2.0));
vec3 tmpvar_10;
tmpvar_10 = (fract (abs (tmpvar_9)) * vec3(2.0, 2.0, 2.0));
float tmpvar_11;
if ((tmpvar_9.x >= 0.0)) {
tmpvar_11 = tmpvar_10.x;
} else {
tmpvar_11 = -(tmpvar_10.x);
};
float tmpvar_12;
if ((tmpvar_9.y >= 0.0)) {
tmpvar_12 = tmpvar_10.y;
} else {
tmpvar_12 = -(tmpvar_10.y);
};
float tmpvar_13;
if ((tmpvar_9.z >= 0.0)) {
tmpvar_13 = tmpvar_10.z;
} else {
tmpvar_13 = -(tmpvar_10.z);
};
vec3 tmpvar_14;
tmpvar_14.x = tmpvar_11;
tmpvar_14.y = tmpvar_12;
tmpvar_14.z = tmpvar_13;
c.xyz = (c.xyz + tmpvar_14);
vec4 tmpvar_15;
tmpvar_15 = (xlv_TEXCOORD0 / vec4(2.0, 2.0, 2.0, 2.0));
vec4 tmpvar_16;
tmpvar_16 = (fract (abs (tmpvar_15)) * vec4(2.0, 2.0, 2.0, 2.0));
float tmpvar_17;
if ((tmpvar_15.x >= 0.0)) {
tmpvar_17 = tmpvar_16.x;
} else {
tmpvar_17 = -(tmpvar_16.x);
};
float tmpvar_18;
if ((tmpvar_15.y >= 0.0)) {
tmpvar_18 = tmpvar_16.y;
} else {
tmpvar_18 = -(tmpvar_16.y);
};
float tmpvar_19;
if ((tmpvar_15.z >= 0.0)) {
tmpvar_19 = tmpvar_16.z;
} else {
tmpvar_19 = -(tmpvar_16.z);
};
float tmpvar_20;
if ((tmpvar_15.w >= 0.0)) {
tmpvar_20 = tmpvar_16.w;
} else {
tmpvar_20 = -(tmpvar_16.w);
};
vec4 tmpvar_21;
tmpvar_21.x = tmpvar_17;
tmpvar_21.y = tmpvar_18;
tmpvar_21.z = tmpvar_19;
tmpvar_21.w = tmpvar_20;
c = (c + tmpvar_21);
c.x = (c.x + (xlv_TEXCOORD0.x - float(int(xlv_TEXCOORD0.x))));
c.xy = (c.xy + (xlv_TEXCOORD0.xy - vec2(ivec2(xlv_TEXCOORD0.xy))));
c.xyz = (c.xyz + (xlv_TEXCOORD0.xyz - vec3(ivec3(xlv_TEXCOORD0.xyz))));
c = (c + (xlv_TEXCOORD0 - vec4(ivec4(xlv_TEXCOORD0))));
gl_FragData[0] = c;
}