bgfx/3rdparty/glsl-optimizer/tests/fragment/ternary-out.txt
Branimir Karadzic dee3fe5266 Initial commit.
2012-04-03 20:30:07 -07:00

47 lines
973 B
Text

varying vec4 xlv_TEXCOORD0;
void main ()
{
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);
};
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);
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;
}