mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
21 lines
333 B
Text
21 lines
333 B
Text
// https://github.com/aras-p/glsl-optimizer/issues/49
|
|
|
|
uniform int loopNum;
|
|
|
|
void main() {
|
|
int myIdx;
|
|
vec4 r = vec4(0.0);
|
|
myIdx = 1;
|
|
for ( ; myIdx < loopNum; ++myIdx) {
|
|
r.x += 1.0;
|
|
r.y += 2.0;
|
|
r.z += 3.0;
|
|
}
|
|
myIdx = 2;
|
|
for ( ; myIdx < loopNum; ++myIdx) {
|
|
r.x += 1.0;
|
|
r.y += 2.0;
|
|
r.z += 3.0;
|
|
}
|
|
gl_FragColor = r;
|
|
}
|