NUI background blur

Hello dear people.
I want to achieve some kind of background blur in my custom ui like it’s done in the fivem main menu (blur the game behind every ui component). I tried using the backdrop-filter css property. The problem is that every resource is kept in it’s own iframe and doesn’t reallt know about the background.
I inspected the fivem main menu using fivem’s devtools/inspector on http://127.0.0.1:13172/. There the whole magic seems to be achieved using a canvas. But I couldn’t find any docs on how to do this.

Is it possible for resource developer to achieve this kind of effect? Is there any documentation on how to do so?

Thanks for any help

Edit:
I want something like on the left side but I get what’s on the right side …

you can try overlaying a blurred image effect

Thank you for your reply. I have already considered this as the last option if I don’t find out how to get a proper blur to work. However this effect could only be used with high opacity as ui with high transparency would break the illusion.
I’m still hopeful that there is a way to properly blur the game behind every component

have you tried any of these CSS filter Property

1 Like

From my understanding those would not work as they only affect the object they are applied to. They can certainly be used for the fake blur with high opacity but what I want to achieve is that everything behind an object (e.g. a div) is affected (blurred). This can be done using the backdrop-filter property which is working in fivem. But the nui resource doesn’t know about the game displayed behind the ui. As mentioned above the fivem main menu seems to be working around this somehow which is what i am trying to do

1 Like
3 Likes

Thank you very much! God bless you and your family!
I’ll try to get this to work and will mark your post as solution later

1 Like

Could you send the solution to the problem in here? I currently have the same problem and would like to find the solution.

whats’a solution

Or you can use TimeCycleModifier which does the trick as well.

SetTimecycleModifier(“Bloom”);
SetTimecycleModifierStrength(2.8);

2 Likes

How did you implement this?