Skip to content
Snippets Groups Projects
Commit f6d34c20 authored by Brian Paul's avatar Brian Paul
Browse files

progs/glsl: change samplers.c to better test sampler/texture indexing

Now the left half is yellow and the right half is red, with the gradients
going in opposite directions.
parent 04d17079
No related branches found
No related tags found
Loading
......@@ -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;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment