mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 21:06:00 +00:00
vo_gpu: reduce the --alpha=blend-tiles checkerboard intensity
This was sort of grating by default and made it really hard to actually read e.g. text on top of a transparent background. I decided to approach the problem from both directions, making the whites darker and the grays lighter. This brings it closer to the dynamic range of e.g. the wikipedia transparent svg preview.
This commit is contained in:
parent
e3288c4597
commit
f3ec494613
@ -2767,7 +2767,7 @@ static void pass_draw_to_screen(struct gl_video *p, struct ra_fbo fbo)
|
||||
// Draw checkerboard pattern to indicate transparency
|
||||
GLSLF("// transparency checkerboard\n");
|
||||
GLSL(bvec2 tile = lessThan(fract(gl_FragCoord.xy * 1.0/32.0), vec2(0.5));)
|
||||
GLSL(vec3 background = vec3(tile.x == tile.y ? 1.0 : 0.75);)
|
||||
GLSL(vec3 background = vec3(tile.x == tile.y ? 0.93 : 0.87);)
|
||||
GLSL(color.rgb = mix(background, color.rgb, color.a);)
|
||||
} else if (p->opts.alpha_mode == ALPHA_BLEND) {
|
||||
// Blend into background color (usually black)
|
||||
|
Loading…
Reference in New Issue
Block a user