mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
backend: gl: fix shadow from mask
The intermediate texture used for shadow from mask calculation did not properly set the min/mag filter to linear, which is required by the blur methods. Because they use texture interpolation to accelerate the convolution calculation. Fixes #916 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
abea823f5d
commit
7d0d693ca7
1 changed files with 2 additions and 0 deletions
|
@ -1213,6 +1213,8 @@ void *gl_shadow_from_mask(backend_t *base, void *mask,
|
|||
auto source_texture = gl_new_texture(GL_TEXTURE_2D);
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, source_texture);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, new_inner->width, new_inner->height, 0,
|
||||
GL_RED, GL_UNSIGNED_BYTE, NULL);
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
|
|
Loading…
Reference in a new issue