horizontal display artifacts
in
Programming Questions
•
2 months ago
Hi,
I'm not sure that this is really a programming issue ...
I just wrote a little sketch to display 2 different colors one after the other in a slope.
here is an example:
PVector red, green;
int counter;
void setup(){
size (640,480);
background(0);
frameRate (55);
counter = 0;
red = new PVector (255,0,0);
green = new PVector (0,255,0);
}
void draw(){
if (counter > 110){counter = 1;}
if (counter < 55){background (red.x, red.y, red.z);}
else if (counter > 55){background (green.x,green.y, green.z);}
counter++;
}
Now I notice that for something like 10 cycles the change from red to green is fine, but then for another ~10 cycles horizontal line artifacts appear that start at the lower screen edge and move continuously upwards. it looks like as if parts of the screen switch color at one frame and the rest of the screen switches at the following frame to the next color. I tried to change the framerate (monitor runs at 60Hz), but with no effect.
Does anyone know what causes these artifacts?
mealworm
I'm not sure that this is really a programming issue ...
I just wrote a little sketch to display 2 different colors one after the other in a slope.
here is an example:
PVector red, green;
int counter;
void setup(){
size (640,480);
background(0);
frameRate (55);
counter = 0;
red = new PVector (255,0,0);
green = new PVector (0,255,0);
}
void draw(){
if (counter > 110){counter = 1;}
if (counter < 55){background (red.x, red.y, red.z);}
else if (counter > 55){background (green.x,green.y, green.z);}
counter++;
}
Now I notice that for something like 10 cycles the change from red to green is fine, but then for another ~10 cycles horizontal line artifacts appear that start at the lower screen edge and move continuously upwards. it looks like as if parts of the screen switch color at one frame and the rest of the screen switches at the following frame to the next color. I tried to change the framerate (monitor runs at 60Hz), but with no effect.
Does anyone know what causes these artifacts?
mealworm
1