Quote:
Originally Posted by IanB
the accumulating error is added to an already processed pixel
|
if you scan left->right, then l1 is an offset to the left pixel, and r1 is an offset to the right pixel.
it alternates between scanning left->right and right->left (see the calculation of
x). I flip the sign on
l1/
r1 each line too, so
r1 is always an offset to the pixel next in line.
it's called "serpentine scanning" and helps avoid some rare bad looking patterns.