summaryrefslogtreecommitdiff
path: root/progs/glsl/CH06-brick.frag.txt
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2007-06-21 10:22:28 +0800
committerZou Nan hai <nanhai.zou@intel.com>2007-06-21 10:22:28 +0800
commitd19d0596daf004b56d80f78fa1a329b43c2ebf94 (patch)
tree24a911efdfe23a8e4cbec85d519875d78eb64be6 /progs/glsl/CH06-brick.frag.txt
parent58eac1bbf320b4104c3158aaeca4726f1a59daf9 (diff)
support branch and loop in pixel shader
most of the sample working with some small modification
Diffstat (limited to 'progs/glsl/CH06-brick.frag.txt')
-rw-r--r--progs/glsl/CH06-brick.frag.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/progs/glsl/CH06-brick.frag.txt b/progs/glsl/CH06-brick.frag.txt
index 06ef04e3af..388c5f9e66 100644
--- a/progs/glsl/CH06-brick.frag.txt
+++ b/progs/glsl/CH06-brick.frag.txt
@@ -23,7 +23,11 @@ void main()
position = MCposition / BrickSize;
- if (fract(position.y * 0.5) > 0.5)
+// if (fract(position.y * 0.5) > 0.5)
+// position.x += 0.5;
+ float tmp;
+ tmp = fract(position.y * 0.5);
+ if (tmp > 0.5)
position.x += 0.5;
position = fract(position);