From b546d79e969e0d6da06fddd0b680eb433d46c48d Mon Sep 17 00:00:00 2001 From: Trammell Hudson Date: Fri, 31 Dec 1999 21:27:22 -0500 Subject: [PATCH] more test to demonstate various ghosting bugs --- matrix-test.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/matrix-test.c b/matrix-test.c index 591bd1ab..9af09343 100644 --- a/matrix-test.c +++ b/matrix-test.c @@ -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 @@ -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 } } }