Commit Graph

6 Commits

Author SHA1 Message Date
Yuxuan Shui 1271839baf
options: add dithered-present option
See also 0a2cd0f14e

Related: #602

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-11-30 05:33:21 +00:00
Yuxuan Shui 0a2cd0f14e
backend: gl: add dither
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>
2022-11-30 05:08:02 +00:00
Yuxuan Shui a29caeaf3d
ackend: gl: implement shadow_from_mask
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-31 07:00:41 +01:00
Yuxuan Shui de209fd52c
backend: gl: fix x_rect_to_coords when y_inverted is false
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>
2022-08-26 05:43:12 +01:00
Yuxuan Shui e942f253f7
backend: gl: make blur take a source texture and a target fbo
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>
2022-08-25 18:07:57 +01:00
Yuxuan Shui e2d990dc3d
backend: gl: split code into multiple files
gl_common.c is getting too big.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-25 13:31:54 +01:00