wlrfx / scenefx

A drop-in replacement for the wlroots scene API that allows wayland compositors to render surfaces with eye-candy effects
MIT License
81 stars 8 forks source link

[FX Renderer] Add blur #30

Closed ErikReider closed 8 months ago

ErikReider commented 9 months ago

Fixes: #14 Supersedes: #22

TODO:

WillPower3309 commented 9 months ago

Thanks for your patience in waiting for a review!

ErikReider commented 9 months ago

an you explain at a high level how we handle blur ignore transparent in scene?

It's actually pretty simple, the comp needs to call the wlr_scene_buffer_set_backdrop_blur_ignore_transparent function for the wlr_scene_buffer node:

https://github.com/ErikReider/fx-comp/blob/80a2c853a62dafecef149b00c6888f7622c2a643/src/desktop/xdg.c#L39

The actual wlr_scene part of it is the same as we do in SwayFX where we pass a bool to the blur function indicating whether we want to ignore the transparent regions or not. (Render the surface texture and stencil it, etc…)

ErikReider commented 9 months ago

What we can do is to separate the renderer impl and the scene impl into separate PRs to make it easier for you to review. What do you think of that idea @WillPower3309 ?

WillPower3309 commented 9 months ago

What we can do is to separate the renderer impl and the scene impl into separate PRs to make it easier for you to review. What do you think of that idea @WillPower3309 ?

If you don't mind that would be great!

ErikReider commented 9 months ago

What we can do is to separate the renderer impl and the scene impl into separate PRs to make it easier for you to review. What do you think of that idea @WillPower3309 ?

If you don't mind that would be great!

Done :)

ErikReider commented 8 months ago

Done! :)