summaryrefslogtreecommitdiff
path: root/progs/vpglsl/varfor4f.glsl
blob: c70ba0356fd89af9ae6f3b2a90b38a392d086a20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const int KernelSize = 4;
uniform vec4 KernelValue4f[KernelSize];

void main(void)
{
    int i;
    vec4 sum = vec4(0.0);
    vec4 tmp = gl_Color;
    gl_Position = gl_Vertex;

    for (i = 0; i < KernelSize; ++i) {
        vec4 rgba;

        rgba = KernelValue4f[i];

        sum += tmp * rgba;
    }
    gl_FrontColor = sum;
}