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

23 lines
283 B
Plaintext

varying lowp float xx;
int func(inout float x)
{
x = x*2.0;
return 0;
}
void main()
{
lowp float x = xx;
int i = func(x); // side effects!
if (x < 0.0)
discard;
lowp float c = 0.0;
for (; i < 4; ++i)
c += xx;
gl_FragColor = vec4(c);
}