Switches with both uniform and varying "switch" expressions are supported. Switch statements with varying expressions and very large numbers of labels may not perform well; some issues to be filed shortly will track opportunities for improving these.
19 lines
369 B
Plaintext
19 lines
369 B
Plaintext
|
|
export uniform int width() { return programCount; }
|
|
|
|
|
|
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
|
int a = aFOO[programIndex];
|
|
switch (b) {
|
|
case 5:
|
|
RET[programIndex] = 0;
|
|
break;
|
|
default:
|
|
RET[programIndex] = -1;
|
|
}
|
|
}
|
|
|
|
export void result(uniform float RET[]) {
|
|
RET[programIndex] = 0;
|
|
}
|