Bug 460412 - Blur effect conflict with scale effect when draw rounded rect with blur behind.
Summary: Blur effect conflict with scale effect when draw rounded rect with blur behind.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-14 09:11 UTC by Mouse Zhang
Modified: 2022-10-21 15:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26.2


Attachments
abnormal blur (1.10 MB, video/mp4)
2022-10-14 09:11 UTC, Mouse Zhang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mouse Zhang 2022-10-14 09:11:31 UTC
Created attachment 152798 [details]
abnormal blur

SUMMARY

When I develop my application(which has rounded window), I found some problem (lots of blur horizontal striation) when the app open/close.

STEPS TO REPRODUCE
1. Run or stop the app.
2. Watch it.

OBSERVED RESULT
I have added an attachment.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.18 and 5.26 (only tested on these version)
(available in About System)
KDE Plasma Version: 5.26
KDE Frameworks Version: 5.98
Qt Version: 5.15.5

ADDITIONAL INFORMATION
I tried to modify blur effect's shader,  make all fragColor = vec4(0, 1, 0, 1), the horizontal striation not disappear, just turn to green striation. Then I tried to changed scale effect, found that only scale property influence the result. If someone can provide ideas, I'd like to try~
Comment 1 Mouse Zhang 2022-10-18 07:05:59 UTC
I have an idea: when QRegion represents a circle, it will divide the circle into small rectangles, some with a height of 1, others with a height of 2 or more, and rectangles with a height of 1 will disappear after scaling, while others will remain to form stripes.

I don't know if my guess is correct.
Comment 2 ratijas 2022-10-18 08:38:57 UTC
> I have an idea: when QRegion represents a circle, it will divide the circle into small rectangles, some with a height of 1, others with a height of 2 or more, and rectangles with a height of 1 will disappear after scaling, while others will remain to form stripes.
>
> I don't know if my guess is correct.

No idea how it's actually made, but that sounds like kind of an issue which OpenGL tessellation guarantees were supposed to prevent. Standard mandates that adjacent triangles must be sampled without gaps.
Comment 3 Vlad Zahorodnii 2022-10-21 10:31:11 UTC
Git commit 8468eeafdd8d4dfac0a61de077687b1961ff73da by Vlad Zahorodnii, on behalf of Mouse Zhang.
Committed on 21/10/2022 at 10:01.
Pushed by vladz into branch 'master'.

effects/blur: Fix blur stripes when rounded window scaling

M  +2    -2    src/effects/blur/blur.cpp

https://invent.kde.org/plasma/kwin/commit/8468eeafdd8d4dfac0a61de077687b1961ff73da