config: disable gamma-correct blending by default

When using 8-bit surfaces (like foot does by default), there's enough
loss of precision when using a linear color space, that the difference
in color is visible, especially for dark colors.

Since 10-bit surfaces is too slow (and since 10 bits isn't really
enough anyway), and since there are no other high precision surface
types in common between Wayland SHM and pixman, we have to choose
between:

1. gamma-correct blending, but "wrong colors"
2. gamma-incorrect blending, "correct colors".

Since most users do see the difference in colors, few users see the
difference in font rendering, and since gamma-incorrect blending is
how most applications still render fonts (and is thus considered
"normal"), let's change the default to gamma *incorrect* blending.

This is just a change of the default value; users can still enable
gamma-correct blending with 'gamma-correct-blending=yes'.
This commit is contained in:
Daniel Eklöf 2025-04-19 17:03:23 +02:00
parent 4d70bb7b42
commit 16b4862cb3
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 21 additions and 29 deletions

View file

@ -5251,6 +5251,6 @@ render_xcursor_set(struct seat *seat, struct terminal *term,
bool
render_do_linear_blending(const struct terminal *term)
{
return term->conf->gamma_correct != GAMMA_CORRECT_DISABLED &&
return term->conf->gamma_correct &&
term->wl->color_management.img_description != NULL;
}