messing with dithering again. I won't waste any more time on it!
This commit is contained in:
@@ -347,8 +347,8 @@ retry:
|
||||
PixFmtMasks[pixfmt].masks[0], PixFmtMasks[pixfmt].masks[1],
|
||||
PixFmtMasks[pixfmt].masks[2], PixFmtMasks[pixfmt].masks[3]);
|
||||
|
||||
SM_SDL_OrderedDither(img, dst);
|
||||
//SM_SDL_ErrorDiffusionDither(img, dst);
|
||||
//SM_SDL_OrderedDither(img, dst);
|
||||
SM_SDL_ErrorDiffusionDither(img, dst);
|
||||
SDL_FreeSurface(img);
|
||||
img = dst;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ void SM_SDL_ErrorDiffusionDither(const SDL_Surface *src, SDL_Surface *dst)
|
||||
CLAMP( accumError[c], -128, +128 );
|
||||
|
||||
// Keep only a fraction of the error to make the effect more subtle.
|
||||
accumError[c] /= 4;
|
||||
accumError[c] /= (rand()%4)+1;
|
||||
}
|
||||
|
||||
srcp += src->format->BytesPerPixel;
|
||||
@@ -197,3 +197,4 @@ void SM_SDL_ErrorDiffusionDither(const SDL_Surface *src, SDL_Surface *dst)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user