summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
Diffstat (limited to 'progs')
-rw-r--r--progs/glsl/Makefile4
-rw-r--r--progs/glsl/samplers.c16
2 files changed, 16 insertions, 4 deletions
diff --git a/progs/glsl/Makefile b/progs/glsl/Makefile
index 0875bdd7950..8103a5cbca0 100644
--- a/progs/glsl/Makefile
+++ b/progs/glsl/Makefile
@@ -37,6 +37,7 @@ DEMO_SOURCES = \
pointcoord.c \
points.c \
samplers.c \
+ samplers_array.c \
shadow_sampler.c \
shtest.c \
skinning.c \
@@ -79,6 +80,9 @@ clean:
##### Extra dependencies
+samplers_array.o: samplers.c
+ $(APP_CC) $(CFLAGS) -DSAMPLERS_ARRAY $< -c -o $@
+
extfuncs.h: $(TOP)/progs/util/extfuncs.h
cp $< .
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;
+ }
}
}