summaryrefslogtreecommitdiffstats
path: root/progs/glsl/samplers.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-08-26 12:01:23 -0600
committerBrian Paul <[email protected]>2009-08-26 12:01:23 -0600
commit476290946e7bd3b7fe5688622127d8c6a9c7f367 (patch)
treeba31a644465765c2689877aa1626e479826ae301 /progs/glsl/samplers.c
parent2bcf787de1884dff34749d308eb245da457ef649 (diff)
parent488b3c4d1bc3d830477180759a42dbaf8f5801b0 (diff)
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'progs/glsl/samplers.c')
-rw-r--r--progs/glsl/samplers.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/progs/glsl/samplers.c b/progs/glsl/samplers.c
index 113e5bbeff1..87dad5d8575 100644
--- a/progs/glsl/samplers.c
+++ b/progs/glsl/samplers.c
@@ -211,10 +211,18 @@ InitTextures(void)
for (y = 0; y < stripeSize; y++) {
for (x = 0; x < size; x++) {
GLint k = 4 * ((ypos + y) * size + x);
- texImage[k + 0] = intensity;
- texImage[k + 1] = intensity;
- texImage[k + 2] = 0;
- texImage[k + 3] = 255;
+ if (x < size / 2) {
+ texImage[k + 0] = intensity;
+ texImage[k + 1] = intensity;
+ texImage[k + 2] = 0;
+ texImage[k + 3] = 255;
+ }
+ else {
+ texImage[k + 0] = 255 - intensity;
+ texImage[k + 1] = 0;
+ texImage[k + 2] = 0;
+ texImage[k + 3] = 255;
+ }
}
}