bgfx/3rdparty/glsl-optimizer/tests/fragment/opt-movevars-sideeffect2-inES.txt

17 lines
226 B
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
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);
}