How to per-pixel window transparency

Hello, I want to make an effect where the transparency of the window depends on the alpha value of the framebuffer. Is that possible?
To explain with examples:
like Elder Scrolls Online’s launcher where the edges are semi transparent
like Riots launch icon that shows riot games on the screen when launching LOL

Its a per-pixel window transparency. Currently I can only get a opacity that effect the entire window to work.

See the documentation on Window Transparency. There are some issues on Windows, if you have an AMD GPU I believe you need to turn OpenGL triple buffering off. There is a solution being worked on.