Skip to content

blur: add clipping region#138

Closed
the-eater wants to merge 4 commits intowlrfx:mainfrom
the-eater:add-clipping-to-blur
Closed

blur: add clipping region#138
the-eater wants to merge 4 commits intowlrfx:mainfrom
the-eater:add-clipping-to-blur

Conversation

@the-eater
Copy link
Copy Markdown
Member

Currently blur does not respect the clipping region

So when blur is enabled on an element, and a clipping region is applied, the clipping region is filled with blur.

My PR on swayfx is affected by this as shown by discord user ahf

TEMP

Both the top and bottom parts shouldn't be covered by blur and simply show the contents of the main buffer, however the border is rendered after the content, and overlays it with the blur.

Adding this clipping code fixes it.

@WillPower3309
Copy link
Copy Markdown
Member

Could I see a screenshot of what it looks like after the PR is applied? Logic looks good but want to see it as well

@the-eater
Copy link
Copy Markdown
Member Author

Both of these are made with the current head in my branch in swayfx, no changes will be needed there

With unpatched scenefx:

20251006_15h47m03s_grim

With this patch

20251006_15h47m31s_grim

@ErikReider
Copy link
Copy Markdown
Member

Both of these are made with the current head in my branch in swayfx, no changes will be needed there

Are you applying the blur to the border scene_buffer? I'm not really getting that's being shown here

@the-eater
Copy link
Copy Markdown
Member Author

@ErikReider I'm applying blur to the scene rect's of the border's and titlebar, as seen here

the-eater/swayfx@7eed52a

The top and bottom border in screenshots are made taller to accommodate the border radius, and then a clipping region is used to still display the content behind it.

e.g. without the patch but also without blur it displays fine

20251006_20h17m51s_grim

Copy link
Copy Markdown
Member

@ErikReider ErikReider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM

@ErikReider ErikReider added the enhancement New feature or request label Oct 6, 2025
@the-eater the-eater requested a review from ErikReider October 15, 2025 16:43
@WillPower3309
Copy link
Copy Markdown
Member

Just one comment, thanks!

@the-eater the-eater force-pushed the add-clipping-to-blur branch 2 times, most recently from 3cb4b67 to c42748e Compare October 21, 2025 16:59
@the-eater the-eater force-pushed the add-clipping-to-blur branch from c42748e to 5204966 Compare October 21, 2025 17:00
@WillPower3309 WillPower3309 mentioned this pull request Oct 29, 2025
3 tasks
@the-eater
Copy link
Copy Markdown
Member Author

clipping in favor of #149

@the-eater the-eater closed this Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants