summaryrefslogtreecommitdiffstats
path: root/progs/fpglsl/for.glsl
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2010-03-10 15:37:18 -0500
committerZack Rusin <[email protected]>2010-03-10 15:37:18 -0500
commit5f80dad7fd03ca811f2b0561269be0180970dbf8 (patch)
tree2ad05e3134684cf5e8a18d63027f1e3b096e1130 /progs/fpglsl/for.glsl
parent7069dff80f25d0ac532c9f76634d1cd382d4fac1 (diff)
fpglsl: add some for and while loops
Diffstat (limited to 'progs/fpglsl/for.glsl')
-rw-r--r--progs/fpglsl/for.glsl11
1 files changed, 11 insertions, 0 deletions
diff --git a/progs/fpglsl/for.glsl b/progs/fpglsl/for.glsl
new file mode 100644
index 00000000000..6aa03d6ef48
--- /dev/null
+++ b/progs/fpglsl/for.glsl
@@ -0,0 +1,11 @@
+uniform int KernelSizeInt;
+
+void main() {
+ int i;
+ vec4 sum = vec4(0.0);
+ for (i = 0; i < KernelSizeInt; ++i) {
+ sum.g += 0.25;
+ }
+ sum.a = 1;
+ gl_FragColor = sum;
+}