bgfx/3rdparty/glsl-optimizer/tests/fragment/opt-movevars-sideeffect2-inES.txt
2012-10-07 20:41:18 -07:00

17 lines
226 B
Plaintext

varying lowp float xx;
void main()
{
int x;
int i = (x=(xx>0.5?2:4)); // side effects!
if (x < 2)
discard;
lowp float c = 0.0;
for (; i < 4; ++i)
c += xx;
gl_FragColor = vec4(c);
}