Fix issue with text blend mode

The source alpha was being multiplied by itself, making text look
thinner than it should. Now we just take the max alpha.
This commit is contained in:
Nunuhara Cabbage
2022-05-05 18:09:51 -07:00
parent 6080af3621
commit 0b52a4baa0
+2 -1
View File
@@ -1002,7 +1002,8 @@ void gfx_draw_glyph(Texture *dst, float dx, int dy, Texture *glyph, SDL_Color co
fill_data.threshold = 0.001;
run_copy_shader(&fill_amap_under_border_shader.s, dst, dst, &fill_data);
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBlendEquationSeparate(GL_FUNC_ADD, GL_MAX);
struct copy_data data = STRETCH_DATA(
dx, dy, glyph->w * scale_x, glyph->h,