Add bayer ordered dithering when presenting to screen. Reduce banding
when using a strong blur. Also use 16-bit intermediary textures to
preserve precision in the rendering pipeline.
Related: #602
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Since image_dst is in X coordinates, after flipping Y, we need to
subtract the height of the drawing area, to make it the bottom right
corner for OpenGL.
However, this breaks blur. Because we assumed the drawing area is the
same size as the texture, which is not the case for blur. So add the
height of the drawing area as another parameter.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Instead of always using the back texture/fbo. Also use the size of the
source texture, instead of hard coded back buffer size.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>