mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
22 lines
283 B
Text
22 lines
283 B
Text
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);
|
|
}
|