WillPower3309 / swayfx

SwayFX: Sway, but with eye candy!
MIT License
1.2k stars 47 forks source link

refactor: blur refactor #181

Closed WillPower3309 closed 10 months ago

WillPower3309 commented 1 year ago

Todo: remove https://github.com/WillPower3309/swayfx/blob/master/sway/desktop/render.c#L308-L309

ErikReider commented 1 year ago

Currently broken on scaled outputs, haven't tested rotated yet

ErikReider commented 1 year ago

Todo: remove master/sway/desktop/render.c#L308-L309

Removing this breaks scaling above 1.0 :/

WillPower3309 commented 1 year ago

Todo: remove master/sway/desktop/render.c#L308-L309

Removing this breaks scaling above 1.0 :/

Removed it anyway :P should've been more clear that I meant scale prior to calling the function

WillPower3309 commented 1 year ago

Could probably remove one of the two main framebuffer binds in fx_renderer_begin

WillPower3309 commented 1 year ago

@ErikReider mind sharing your config settings? Can't reproduce the blur issues with a scale of 2

ErikReider commented 1 year ago

@ErikReider mind sharing your config settings? Can't reproduce the blur issues with a scale of 2

image

I have a huuuge testing config with a bunch of commented out options so I'll provide the relevant bits

blur on
blur_xray off
# blur_radius 2
# blur_passes 3
blur_radius 5
blur_passes 3
# blur_strength 9

for_window [app_id="kitty" title="first"] floating enable; resize set 300 300
for_window [app_id="kitty" title="floating"] floating enable; move left 280

output WL-1 {
    # transform 270
    # transform 90
    # transform 180

    # transform flipped
    # transform flipped-90
    # transform flipped-270
    # transform flipped-180

    scale 0.5
    # scale 0.95
    # scale 0.75
    # scale 0.5
}

exec kitty -T "first" -d ~/ -o "background_opacity 0.0"
exec kitty -T "floating" -o "background_opacity 0.0"
WillPower3309 commented 12 months ago

Seems

@ErikReider mind sharing your config settings? Can't reproduce the blur issues with a scale of 2

image

I have a huuuge testing config with a bunch of commented out options so I'll provide the relevant bits

blur on
blur_xray off
# blur_radius 2
# blur_passes 3
blur_radius 5
blur_passes 3
# blur_strength 9

for_window [app_id="kitty" title="first"] floating enable; resize set 300 300
for_window [app_id="kitty" title="floating"] floating enable; move left 280

output WL-1 {
  # transform 270
  # transform 90
  # transform 180

  # transform flipped
  # transform flipped-90
  # transform flipped-270
  # transform flipped-180

  scale 0.5
  # scale 0.95
  # scale 0.75
  # scale 0.5
}

exec kitty -T "first" -d ~/ -o "background_opacity 0.0"
exec kitty -T "floating" -o "background_opacity 0.0"

Seems to only occur when the scale is less than 1, hmm

WillPower3309 commented 12 months ago

Moving some of the blur work into fx_renderer for a few reasons:

Quite a few TODOs remaining. For one, the blur doesn't actually render right now

WillPower3309 commented 12 months ago

Commit https://github.com/WillPower3309/swayfx/commit/a5a38efc004b2306fb4183f99ea1e2d69d68ea24

Makes blur not render for some weird reason. I'd suspect the wrong buffer being rendered, but not sure how this would happen

ErikReider commented 11 months ago

Fixed the scaling issue. One... Line... Of... Code...

WillPower3309 commented 10 months ago

superceded by #219

Will think about refactoring the framebuffer binds in another PR