gpu: Fix shadows even more

Math is hard.

But this time, it comes with a test!
This commit is contained in:
Benjamin Otte 2024-07-30 17:24:17 +02:00
parent 65e02a3bae
commit 9f71528a05
4 changed files with 9 additions and 1 deletions

View File

@ -115,7 +115,7 @@ blur_corner (vec2 p,
r /= _sigma;
if (min (p.x, p.y) <= -2.95 ||
max (p.x, p.y) >= 2.95)
max (p.x - r.x, p.y - r.y) >= 2.95)
return 0.0;
float result = 0.0;

View File

@ -0,0 +1,7 @@
clip {
clip: 0 0 25 25;
child: outset-shadow {
blur: 1;
outline: 0 0 100 100 / 100 0 100 0;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

View File

@ -121,6 +121,7 @@ compare_render_tests = [
'opacity-overlapping-children',
'outset-shadow-corner-blur',
'outset-shadow-corner-blur-huge-nocairo-nogl',
'outset-shadow-corner-blur-normal',
'outset-shadow-corner-blur-tiny',
'outset_shadow_offset_both',
'outset_shadow_offset_x',