mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
17 lines
226 B
Text
17 lines
226 B
Text
|
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);
|
||
|
}
|