~ubuntu-branches/ubuntu/oneiric/mesa-demos/oneiric

« back to all changes in this revision

Viewing changes to src/vpglsl/varfor4f.glsl

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2010-09-27 16:18:27 UTC
  • Revision ID: james.westby@ubuntu.com-20100927161827-1yfgolc1oy9sjhi8
Tags: upstream-8.0.1
ImportĀ upstreamĀ versionĀ 8.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
const int KernelSize = 4;
 
2
uniform vec4 KernelValue4f[KernelSize];
 
3
 
 
4
void main(void)
 
5
{
 
6
    int i;
 
7
    vec4 sum = vec4(0.0);
 
8
    vec4 tmp = gl_Color;
 
9
    gl_Position = gl_Vertex;
 
10
 
 
11
    for (i = 0; i < KernelSize; ++i) {
 
12
        vec4 rgba;
 
13
 
 
14
        rgba = KernelValue4f[i];
 
15
 
 
16
        sum += tmp * rgba;
 
17
    }
 
18
    gl_FrontColor = sum;
 
19
}