The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Color dithering in Android
rtrussell


Joined: 10 Feb 2016
Posts: 88
Is it possible to disable the color dithering that takes place when rendering an ABGR8888 texture onto a RGB565 target (Android GLES)? I'm repetitively copying between the renderer target and the texture (using SDL_RenderReadPixels and SDL_RenderCopy) and this is causing the dithering to be magnified until it becomes very visible. Using the nearest solid color would presumably solve this problem.

I initially thought I would simply have to choose my 24-bit colors so that only the top 5-bits of the components were non-zero, but that didn't work - they were still dithered. If there is some magic in determining which colors will be dithered and which won't that would be an alternative solution.

Richard.
Color dithering in Android
SiPlus


Joined: 06 Feb 2015
Posts: 13
If you can call GLES functions directly, try glDisable(GL_DITHER).

On 20/05/2016 19:28, rtrussell wrote:

Quote:
Is it possible to disable the color dithering that takes place when rendering an ABGR8888 texture onto a RGB565 target (Android GLES)? I'm repetitively copying between the renderer target and the texture (using SDL_RenderReadPixels and SDL_RenderCopy) and this is causing the dithering to be magnified until it becomes very visible. Using the nearest solid color would presumably solve this problem.

I initially thought I would simply have to choose my 24-bit colors so that only the top 5-bits of the components were non-zero, but that didn't work - they were still dithered. If there is some magic in determining which colors will be dithered and which won't that would be an alternative solution.

Richard.


Quote:
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Color dithering in Android
rtrussell


Joined: 10 Feb 2016
Posts: 88
SiPlus wrote:
If you can call GLES functions directly, try glDisable(GL_DITHER).

Yes, thanks, I also found that myself and indeed it does exactly what I want.

Richard.