32 lines
817 B
Plaintext
32 lines
817 B
Plaintext
static float float4(uniform float a, uniform float b, uniform float c,
|
|
uniform float d) {
|
|
float ret = 0;
|
|
cfor (uniform int i = 0; i < programCount; i += 4) {
|
|
ret = insert(ret, i + 0, a);
|
|
ret = insert(ret, i + 1, b);
|
|
ret = insert(ret, i + 2, c);
|
|
ret = insert(ret, i + 3, d);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
export uniform int width() { return programCount; }
|
|
|
|
|
|
|
|
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
|
float a = aFOO[programIndex&0x3];
|
|
uniform int x;
|
|
float aa = a;
|
|
cfor (x = 0; x < 99999; ++x) {
|
|
if (x == a) cbreak;
|
|
++aa;
|
|
}
|
|
RET[programIndex] = aa;
|
|
}
|
|
|
|
export void result(uniform float RET[]) {
|
|
uniform float ret[4] = { 2,4,6,8 };
|
|
RET[programIndex] = ret[programIndex & 0x3];
|
|
}
|