WillPower3309 / swayfx

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

Blur improvements #249

Closed ozwaldorf closed 6 months ago

ozwaldorf commented 6 months ago

The current blur implementation could be enhanced with a configurable noise pass to reduce banding on high blur setting, as well as settings for contrast/brightness. These features were recently added to hyprland, and drastically improved the blur appearance and usability.

The noise pass can effectively remove banding, especially when wallpapers do not have a wide range of colors. For example, many wallpapers produced with lutgen will start banding when blurred, due to a much lower contrast between pixels.

The brightness and contrast settings are also a good QOL addition, as you can setup a look similar to MacOS, which lowers these values so that the blur does not conflict with the window's contents. These tweaks help maintain readability in applications such as the terminal.

ErikReider commented 6 months ago

For example, many wallpapers produced with lutgen will start banding when blurred, due to a much lower contrast between pixels.

Could you provide a screenshot?

The brightness and contrast settings are also a good QOL addition, as you can setup a look similar to MacOS, which lowers these values so that the blur does not conflict with the window's contents.

Could you also provide screenshots for this? Would be nice to see a comparison :)

ozwaldorf commented 6 months ago

Sure, here's some examples.

Note: view these in full quality, the previews here change how it looks

SwayFx Example

image

Hyprland Examples

No noise, full contrast and brightness: image

Noise 0.02, full contrast and brightness: image

Noise 0.02, default contrast and brightness: image

ozwaldorf commented 6 months ago

I was able to hack in hyprland's noise shader in an experiment https://github.com/ozwaldorf/swayfx/commit/253435a5675229b91735d81a90dd039f66567488

which looks nice and on par with hyprland (noise 0.02): image

WillPower3309 commented 6 months ago

I was able to hack in hyprland's noise shader in an experiment https://github.com/ozwaldorf/swayfx/commit/253435a5675229b91735d81a90dd039f66567488

which looks nice and on par with hyprland (noise 0.02): image

Feel free to open a PR! Great stuff :D