diff options
author | Dave Airlie <airlied@redhat.com> | 2009-02-13 01:11:25 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-13 01:11:25 +1000 |
commit | 53116910b10e3b8a05f42970eff311c21808699f (patch) | |
tree | 6831e50a56a02fed324f8cb119e05d837e00d7cf /progs/vpglsl/varfor2f.glsl | |
parent | 7e104f9cde94279a902b408e8d1cf21779b393a8 (diff) | |
parent | 0ccbc3c905f0594a35d72887a1f115e148aaa596 (diff) |
Merge remote branch 'origin/master' into radeon-rewrite
Conflicts:
configure.ac
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r300/r300_render.c
Diffstat (limited to 'progs/vpglsl/varfor2f.glsl')
-rw-r--r-- | progs/vpglsl/varfor2f.glsl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/progs/vpglsl/varfor2f.glsl b/progs/vpglsl/varfor2f.glsl new file mode 100644 index 0000000000..d98a110045 --- /dev/null +++ b/progs/vpglsl/varfor2f.glsl @@ -0,0 +1,24 @@ +const int KernelSize = 9; +uniform vec2 KernelValue2f[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) { + vec2 rg, ba; + + rg = KernelValue2f[i]; + ++i; + if (i < KernelSize) + ba = KernelValue2f[i]; + else + ba = vec2(0, 0); + + sum += tmp * vec4(rg, ba); + } + gl_FrontColor = sum; +} |