Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FX Renderer] Add blur #30

Merged
merged 18 commits into from
Feb 27, 2024
Merged

[FX Renderer] Add blur #30

merged 18 commits into from
Feb 27, 2024

Conversation

ErikReider
Copy link
Member

@ErikReider ErikReider commented Jan 28, 2024

Fixes: #14
Supersedes: #22

TODO:

  • Add global config options (per surface blur won't work due to the damage calculations)
  • Add latest blur features from SwayFX
  • Add "optimized" blur

@ErikReider ErikReider added the enhancement New feature or request label Jan 28, 2024
@ErikReider ErikReider self-assigned this Jan 28, 2024
@ErikReider ErikReider mentioned this pull request Jan 28, 2024
Closed
7 tasks
@ErikReider ErikReider marked this pull request as ready for review February 2, 2024 18:26
Copy link
Member

@WillPower3309 WillPower3309 left a comment

Choose a reason for hiding this comment

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

Some small comments, can you explain at a high level how we handle blur ignore transparent in scene? Reviewing from my phone and that bit of logic is the only one I'm having a nuisance tracking

include/render/fx_renderer/fx_renderer.h Outdated Show resolved Hide resolved
include/render/pass.h Outdated Show resolved Hide resolved
include/scenefx/fx_renderer/fx_renderer.h Outdated Show resolved Hide resolved
render/fx_renderer/fx_framebuffer.c Outdated Show resolved Hide resolved
types/scene/wlr_scene.c Outdated Show resolved Hide resolved
@WillPower3309
Copy link
Member

WillPower3309 commented Feb 15, 2024

Thanks for your patience in waiting for a review!

@ErikReider
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member

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 ErikReider changed the title Add blur [FX Renderer] Add blur Feb 26, 2024
@ErikReider
Copy link
Member Author

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 :)

Copy link
Member

@WillPower3309 WillPower3309 left a comment

Choose a reason for hiding this comment

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

Just a couple minor comments, otherwise LGTM

@ErikReider
Copy link
Member Author

Done! :)

@ErikReider ErikReider merged commit 7f0883b into main Feb 27, 2024
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.

Add blur
2 participants