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

48 lines
1,001 B
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;
if ((xlv_TEXCOORD0.x > 0.5)) {
tmpvar_1 = 0.9;
} else {
tmpvar_1 = 0.1;
};
c = vec4(tmpvar_1);
vec4 tmpvar_2;
if ((xlv_TEXCOORD0.x > 0.5)) {
tmpvar_2 = vec4(0.9, 0.9, 0.9, 0.9);
} else {
tmpvar_2 = vec4(0.1, 0.1, 0.1, 0.1);
};
mediump vec4 tmpvar_3;
tmpvar_3 = (vec4(tmpvar_1) + tmpvar_2);
c = tmpvar_3;
vec3 tmpvar_4;
if ((xlv_TEXCOORD0.x > 0.5)) {
tmpvar_4 = vec3(0.9, 0.9, 0.9);
} else {
tmpvar_4 = vec3(0.1, 0.1, 0.1);
};
c.xyz = (tmpvar_3.xyz + tmpvar_4);
vec2 tmpvar_5;
if ((xlv_TEXCOORD0.x > 0.5)) {
tmpvar_5 = vec2(0.9, 0.9);
} else {
tmpvar_5 = vec2(0.1, 0.1);
};
c.xy = (c.xy + tmpvar_5);
highp float tmpvar_6;
tmpvar_6 = fract (xlv_TEXCOORD0.x);
float tmpvar_7;
if (bool(tmpvar_6)) {
tmpvar_7 = 0.9;
} else {
tmpvar_7 = 0.1;
};
c.x = (c.x + tmpvar_7);
gl_FragData[0] = c;
}