bgfx/3rdparty/glsl-optimizer/tests/fragment/opt-vectorize-ifs-out.txt
2014-02-10 23:06:13 -08:00

25 lines
500 B
Text

uniform sampler2D maintex;
uniform float factor;
varying vec2 uv;
void main ()
{
vec2 coord_1;
vec4 tmpvar_2;
tmpvar_2 = texture2D (maintex, uv);
coord_1 = tmpvar_2.xy;
bool tmpvar_3;
tmpvar_3 = (tmpvar_2.w >= 0.5);
if (!(tmpvar_3)) {
coord_1.x = (tmpvar_2.x + factor);
};
if (tmpvar_3) {
coord_1.y = (tmpvar_2.y + factor);
};
vec4 tmpvar_4;
tmpvar_4.zw = vec2(0.0, 0.0);
tmpvar_4.xy = coord_1;
gl_FragColor = tmpvar_4;
}
// inputs: 1, stats: 5 alu 1 tex 2 flow