Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 26 lines (19 sloc) 0.596 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

struct Point { float x, y, z; };

export uniform int width() { return programCount; }

export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
    float a = aFOO[programIndex];

    soa<8> Point pts[10];
    foreach (i = 0 ... 80) {
        pts[i].x = b*i;
        pts[i].y = 2*b*i;
        pts[i].z = 3*b*i;
    }
    
    soa<8> Point * ptr = &pts[programIndex];
    ++ptr;
    ptr->y = -programIndex;

    assert(1+programCount < 80);
    RET[programIndex] = pts[1+programIndex].y;
}

export void result(uniform float RET[]) {
    RET[programIndex] = -programIndex;
}
Something went wrong with that request. Please try again.