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

23 lines
283 B
Plaintext
Raw Normal View History

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