From c8b325d17f99257bff4552ed2aae18ba971705c7 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 26 Apr 2003 10:57:40 +0000 Subject: [PATCH] messing with dithering again. I won't waste any more time on it! --- stepmania/src/RageBitmapTexture.cpp | 4 ++-- stepmania/src/SDL_dither.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index f8fc034274..2b41794887 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -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; } diff --git a/stepmania/src/SDL_dither.cpp b/stepmania/src/SDL_dither.cpp index 71ff70befa..91e471fa9c 100644 --- a/stepmania/src/SDL_dither.cpp +++ b/stepmania/src/SDL_dither.cpp @@ -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) } } } +