Skip to content

Commit

Permalink
more test to demonstate various ghosting bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
osresearch committed Jan 1, 2000
1 parent 7e8f908 commit b546d79
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions matrix-test.c
Expand Up @@ -101,7 +101,7 @@ rainbow(

for (unsigned x=0; x < width; x++) {
for (unsigned y=0; y < height; y++) {
const int index = (color + x + y*phaseShift/2) % 180;
const int index = (color + x + y*phaseShift/4) % 180;
const uint32_t in = rainbowColors[index];
uint8_t * const out = &pixels[x + y*width];
#if 1
Expand Down Expand Up @@ -134,11 +134,17 @@ gradient(
for (unsigned x=0; x < width; x++) {
for (unsigned y=0; y < height; y++) {
uint8_t * const out = &pixels[x + y*width];
#if 0
//out[0] = ((x+cycle) % 32) * 8;
//out[1] = ((y+cycle) % 16) * 16;
out[0] = ((x+y+cycle) % 32) * 8;
out[1] = ((x+y+cycle) % 32) * 8;
out[2] = ((x+y+cycle) % 32) * 8;
uint8_t b = 0xFF;
out[1] = b * ((((x + y + cycle) >> 5) ) & 1);
#else
uint8_t b = ((x+y+cycle) % 32) * 8;
out[0] = b * ((((x + y + cycle) >> 5) % 3) & 1);
out[1] = b * ((((x + y + cycle) >> 5) % 5) & 1);
out[2] = b * ((((x + y + cycle) >> 5) % 7) & 1);
#endif
}
}
}
Expand Down

0 comments on commit b546d79

Please sign in to comment.