bgfx/3rdparty/glsl-optimizer/tests/fragment/ternary-out.txt
2012-10-07 20:41:18 -07:00

47 lines
992 B
Text

varying vec4 xlv_TEXCOORD0;
void main ()
{
vec4 c_1;
c_1 = vec4(0.0, 0.0, 0.0, 0.0);
float tmpvar_2;
if ((xlv_TEXCOORD0.x > 0.5)) {
tmpvar_2 = 0.9;
} else {
tmpvar_2 = 0.1;
};
c_1 = vec4(tmpvar_2);
vec4 tmpvar_3;
if ((xlv_TEXCOORD0.x > 0.5)) {
tmpvar_3 = vec4(0.9, 0.9, 0.9, 0.9);
} else {
tmpvar_3 = vec4(0.1, 0.1, 0.1, 0.1);
};
vec4 tmpvar_4;
tmpvar_4 = (vec4(tmpvar_2) + tmpvar_3);
c_1 = tmpvar_4;
vec3 tmpvar_5;
if ((xlv_TEXCOORD0.x > 0.5)) {
tmpvar_5 = vec3(0.9, 0.9, 0.9);
} else {
tmpvar_5 = vec3(0.1, 0.1, 0.1);
};
c_1.xyz = (tmpvar_4.xyz + tmpvar_5);
vec2 tmpvar_6;
if ((xlv_TEXCOORD0.x > 0.5)) {
tmpvar_6 = vec2(0.9, 0.9);
} else {
tmpvar_6 = vec2(0.1, 0.1);
};
c_1.xy = (c_1.xy + tmpvar_6);
float tmpvar_7;
tmpvar_7 = fract(xlv_TEXCOORD0.x);
float tmpvar_8;
if (bool(tmpvar_7)) {
tmpvar_8 = 0.9;
} else {
tmpvar_8 = 0.1;
};
c_1.x = (c_1.x + tmpvar_8);
gl_FragData[0] = c_1;
}