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

Curved blur effects #8

Closed
spxak1 opened this issue Oct 26, 2020 · 34 comments
Closed

Curved blur effects #8

spxak1 opened this issue Oct 26, 2020 · 34 comments
Labels
enhancement New feature or request external Something that comes from an external source (such as Gnome Shell)

Comments

@spxak1
Copy link

spxak1 commented Oct 26, 2020

The blur effect has a rectangular shape rather than the curved edges of the Dock and/or panel (as set by themes/shells).
Is this something that can be fixed so that the effect follows the shape of those items?

Thank you.

@aunetx
Copy link
Owner

aunetx commented Oct 26, 2020

Yes, I noticed this some times ago but I forgot to include that!

There is currently no (easy) way to include non-rectangular shape... I could try to draw the corners by hand, with a lot of little rectangles but this seems very hard to do

So I guess this too needs to be fixed in gnome! Sorry for that :(

@aunetx aunetx added bug Something isn't working enhancement New feature or request labels Oct 26, 2020
@spxak1
Copy link
Author

spxak1 commented Oct 26, 2020

Thanks for your response. Doing it by hand is too much and rather pointless as the radius is also different depending on what other extensions people use (I, for one, don't use dash-to-dock but the floating-dock fork that offers control of the radius). So we will wait for gnome.
Thanks.

@aunetx
Copy link
Owner

aunetx commented Oct 26, 2020

OK I see how much perturbing this is actually :/

I will open an issue on gitlab for this too, but I can't really push more than that ftm :(

@aunetx aunetx added external Something that comes from an external source (such as Gnome Shell) and removed bug Something isn't working labels Oct 26, 2020
@andrewaclear
Copy link

KDE has this same issue and no one seems to want to fix it. I feel we should maybe try to write a script that draws those little rectangles for us by following the path of the object. Do you think this is possible @aunetx?

@aunetx
Copy link
Owner

aunetx commented Apr 21, 2021

Sorry for responding very late @andrewaclear :/
Honestly, I don't think this will be possible at our level... It would mean having hundreds of blurred actors, and keeping them in sync with a selected object's shape; this is clearly either very hard to achieve, or very cpu-hungry

@andrewaclear
Copy link

Oh it's ok don't worry @aunetx. Ya, I'm still new to a lot do this stuff so I'm trying to learn. I wanna try to think of a way somehow though because linux should become the best OS and these are the areas that are still putting it inferior to Mac for instance.

@andrewaclear
Copy link

andrewaclear commented Apr 21, 2021

Maybe the best way would be to make/modify to get a really nice theme and then set the corners and everything to work properly with that theme. I mean at the end of the day there's no point in trying to make an ugly theme look good.

@CorvetteCole
Copy link
Collaborator

I have a few ideas on how to round the blur as a part of #39 . Just referencing it here to keep track

@andrewaclear
Copy link

andrewaclear commented Apr 23, 2021

Ok sick. Hey dude, you're the one that was working on blur-provider. That's really cool. Ya I'm totally down to help you guys. I'm a CS student so I'm still learning stuff but if you guys can lead me in the right direction that would be awesome. I have already done some theme designing in linux and really want to help bring it to the next level. Linux is the best but it needs this last push.

@CorvetteCole
Copy link
Collaborator

yep! blur-provider was my baby. I was pretty much the first to build a blur extension and the shell blur was so buggy I just gave up. But, I think this extension has some great stuff and this will be a good addition to it. In terms of learning, I would start by taking a look at https://gjs.guide. I can find more resources later just ping me! I am a Computer Engineering student personally :)

@andrewaclear
Copy link

Oh sweet. Ya for sure. Oh thanks I'll check that. Nice to meet you @CorvetteCole and also @aunetx I'm Andrew.

@aunetx
Copy link
Owner

aunetx commented Apr 24, 2021

Nice to meet you too @andrewaclear, glad you're interested in this extension :)

@Project-Magenta
Copy link

@CorvetteCole how did blur-provider deal with rounded corners?

@CorvetteCole
Copy link
Collaborator

@Project-Magenta it kind of... didn't. That was one of the things I wanted to solve. I sort of abandoned blur-provider development because there were many shell bugs and it was insanely infuriating. I am back at it, and glad to not be the only one working on it this time. So... blur-provider is kind of being entirely rewritten for the inclusion in to this extension

@Project-Magenta
Copy link

Project-Magenta commented Apr 28, 2021

Huh? then why it work with round corners my theme

@CorvetteCole
Copy link
Collaborator

@Project-Magenta well, it still creates a box. so it may look alright at a glance but in reality there are sharp corners still for the blur

@IsraPerez98
Copy link

Wouldn't it be better to have this disabled by default?
Since it's currently broken and it looks bad

@Kyanoxia
Copy link

Kyanoxia commented Jul 7, 2022

I've just had an idea, but take my words with a grain of salt because I'm not an extension developer to this extent. From what I understand, the blur my shell extension adds a sort of layer behind the things it blurs. So what if we make this layer span the entire screen, then use a mask in the shape of the dock to provide blur behind it? That would allow rounded corners, notification blurring, and get rid of some flickering when a high contrast color touches the edge of a blurred element.
Blur-Conecept
Something like this where the black parts would be the blur layer. I suppose that doing this would cause the same issue as drawing the blur layer though, where you can't just make rounded corners without drawing tiny rectangles by hand. Let me know what you think about this!

@CorvetteCole
Copy link
Collaborator

@Zany-Zachary1 this is a good idea in general, the issue is with stacking windows. how do we deal with a blurred window partially on top of another window? or, even worse, a blurred window overlapping ANOTHER blurred window. Static blur is an option already for the panel as an example of this. This is a particularly big problem for blurring notifications, since they are likely to pop up over windows and would look funny if they instead showed the desktop background

@Kyanoxia
Copy link

Kyanoxia commented Jul 8, 2022

Assuming that the masked blur is always live, I suppose we could have different layers. That would be quite performance heavy though. This would however work for the dock assuming no other windows are blurred behind it. I think this would be a good idea to implement with a toggle for multiple layers.

@CorvetteCole
Copy link
Collaborator

CorvetteCole commented Jul 8, 2022

I don't think it's worth spending our time on it, since if we can solve the big problem that fixes ALL cases, that would be far better than a bandaid. That said, I'm sure neither @aunetx or I would be opposed to reviewing a pull request implementing this if you'd like to give it a shot!

@Kyanoxia
Copy link

Kyanoxia commented Jul 8, 2022

Well, if I were good as Aunetx, I totally would. I've only ever made simple extensions, but if anyone else would like to do this, that would be great.

@CorvetteCole
Copy link
Collaborator

No time like the present to learn! We can always use contributors. I went from 0 to being an extensions.gnome.org reviewer relatively quickly. Check out https://gjs.guide/, and join the IRC or Matrix for Gnome Extensions at https://matrix.to/#/#gnome:gnome.org or irc://irc.gnome.org/shell-extensions

@aunetx
Copy link
Owner

aunetx commented Jul 8, 2022

Sorry, I'm very busy and can't help you a lot... This is a good idea, unfortunately from what I've tried, this does not work -- at least not as easily as I would like.

In #265 I tried to use an effect in order to mask the corners of widgets ; you can easily try it out. Unfortunately I've still not found a way to put it on top of the blur effect with backdrop mode.

So if you find a way to do it (even if we need to re-implement the whole blur effect) this can be very great (and there is not need to have only one layer btw, as we can have the blur effect the same size as the widget, and then just mask the corners -- as with the idea in #265). But I'm not sure how to do it, and idk if it is worth the time ; maybe an upstream implementation would be better...

@andrewaclear
Copy link

Just recently Firefox finally implemented blur-backdrop. Can this be helpful since I believe gnome shell was built off of Mozilla back on the day? Idk if there is any relation anymore.

@andrewaclear
Copy link

@Zany-Zachary1 This does sound like a smart potential approach but I guess like you guys were saying we still have the overlapping issue and inefficiency if we just make an entire layer for each. I wonder if Windows might have encountered this as you'll notice that windows that are blurred (like the settings for instance) are only blurred when focused. I'm not saying I like this solution though. It's kinda lame.

@andrewaclear
Copy link

andrewaclear commented Aug 5, 2022

I think implementing border radius into gnome shell's blur option would be most resource efficient and the best solution. Really all we need is border radius and doing some hack in the front end will always be subpar and resource heavy.

@CorvetteCole
Copy link
Collaborator

CorvetteCole commented Feb 13, 2023

Currently working on a proof of concept using COGL to render a custom path (https://developer-old.gnome.org/clutter-cookbook/stable/actors-non-rectangular.html). Would need to override the paint function of the Actor. Will update after I test this

Adding Desktop Cube code as reference for me: https://github.com/Schneegans/Desktop-Cube/blob/main/src/Skybox.js#L141

@hrqmonteiro
Copy link

That's very promising, update us please if anything works

@major-mayer
Copy link

I think implementing border radius into gnome shell's blur option would be most resource efficient and the best solution. Really all we need is border radius and doing some hack in the front end will always be subpar and resource heavy.

Is there any upstream feature request that already tracks this?
Maybe the Gnome devs just don't know that this is a much wanted feature by the theming community?

@hrqmonteiro
Copy link

I think implementing border radius into gnome shell's blur option would be most resource efficient and the best solution. Really all we need is border radius and doing some hack in the front end will always be subpar and resource heavy.

Is there any upstream feature request that already tracks this? Maybe the Gnome devs just don't know that this is a much wanted feature by the theming community?

They are not doing anything related to that.

@major-mayer
Copy link

Okay sorry, I don't know which ones responsibility it would be.
If not gnome than maybe someone else?

@andrewaclear
Copy link

I think i tried to ask once and they didn't seem to really be interested either unfortunately. Could be worth a second shot though.

@aunetx
Copy link
Owner

aunetx commented Apr 19, 2024

Now fixed for GNOME 46 onwards! You can create corners for static blur, this is done by default for dash-to-dock.

I am in deep thoughts about how to do the same for dynamic blur, but that's not as important now that something works so at least this bug is fixed!

@aunetx aunetx closed this as completed Apr 19, 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 external Something that comes from an external source (such as Gnome Shell)
Projects
None yet
Development

No branches or pull requests

9 participants