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

Blurry background #1117

Closed
wajsic opened this issue Apr 28, 2017 · 8 comments
Closed

Blurry background #1117

wajsic opened this issue Apr 28, 2017 · 8 comments

Comments

@wajsic
Copy link

wajsic commented Apr 28, 2017

What would be the easiest way to achieve semi-transparent window with blurry effect in the way like IOS does it.

https://koenig-media.raywenderlich.com/uploads/2014/09/blurs.png

@ocornut
Copy link
Owner

ocornut commented Apr 28, 2017

It's not really the type of thing dear imgui is designed for.

Rendering wise, if we could mark the associated vertices in the draw data, the user-side render code could perform that sort of effect. An hacky-proof of concept would be that for each ImDrawList of the ImDrawData, you look at the first ImDrawCmd and use those vertices or just the bounding box to blur behind. Blurring typically involve multiple targets so getting that to work with an arbitrary number of floating windows may be tricky.

@edin-purkovic
Copy link

Unrimp does that, check out the source... https://github.com/cofenberg/unrimp/

17035620_1074721859299153_409111397_n

@wajsic
Copy link
Author

wajsic commented Apr 28, 2017

@edin-purkovic Would you be so kind and build D3D9 and D3D11 example and upload the binaries since I cant seem to build the project so I can examine them with graphics debugger and figure out what's going on with that code.

@edin-purkovic
Copy link

I assume you're on Windows and have cmake installed.. I had no problems building it with
"cd build" "cmake -G "Visual Studio 15 ..", (for latest visual studio) i just had to lower the warning level for every project to compile because VS sets it on highest for some reason...

@wajsic
Copy link
Author

wajsic commented Apr 28, 2017

Yea, lowering the warning level did the trick. Thanks.

@edin-purkovic
Copy link

edin-purkovic commented Apr 28, 2017

Looks like he uses his own compositor framework and this shader/shader language for bluring the gui:
https://github.com/cofenberg/unrimp/blob/master/bin/DataSource/Content/ShaderBlueprint/Debug/GuiFragment.shader_blueprint
Hope you will have more luck with g debugger to figure it out because it's kinda hard to track all those extern compositor files and blueprints..

@ocornut
Copy link
Owner

ocornut commented May 1, 2017

I am going to mark this a closed issue, as it isn't really the desired scope of imgui and can be handled at user's level.

If you find a nice solution or have screenshots to post don't hesitate to post them here! It's always nice to record references for others who might be interested in similar stuff.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants