-
-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Make per_pixel_transparency
always enabled in the editor
#106324
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
base: master
Are you sure you want to change the base?
Make per_pixel_transparency
always enabled in the editor
#106324
Conversation
Didn't we conclude that this wasn't a good option because per-pixel transparency isn't properly supported on Windows + Nvidia + Vulkan, which is by far our most frequent user setup? I still think it would be preferable to remove popup shadows from the editor theme so this isn't necessary. At least until we can ensure that per-pixel transparency works everywhere and has no significant performance impact. See:
|
The way you implemented it, the transparency will be always enabled in editor builds, not only in the editor. |
I can add a small check to see if it's on Window with Vulkan, and then not enable it.
Is the performance impact really that severe, considering this version is only for the editor? I feel like having the popups be shadowless makes them look really flat and unpolished. |
1392f5f
to
d1adabb
Compare
@KoBeWi Thanks, fixed. |
d1adabb
to
5373544
Compare
I'm not sure why this is causing a memory leak. |
We can probably force it to work, using NVAPI (which is already used for OpenGL), I'll check it. Setting "Vulkan/Opengl present method" to "native" should make transparency work with Vulkan. If it's overridable via API it can be used.
Seems like it's existing one, not introduced by this PR, probably fixable by something like: diff --git a/platform/linuxbsd/x11/gl_manager_x11.cpp b/platform/linuxbsd/x11/gl_manager_x11.cpp
index 41c8cd704b..151730b9a2 100644
--- a/platform/linuxbsd/x11/gl_manager_x11.cpp
+++ b/platform/linuxbsd/x11/gl_manager_x11.cpp
@@ -137,6 +137,10 @@ Error GLManager_X11::_create_context(GLDisplay &gl_display) {
ERR_FAIL_NULL_V(fbc, ERR_UNCONFIGURED);
for (int i = 0; i < fbcount; i++) {
+ if (vi) {
+ XFree(vi);
+ vi = nullptr;
+ }
vi = (XVisualInfo *)glXGetVisualFromFBConfig(x11_display, fbc[i]);
if (!vi) {
continue; |
5373544
to
447dd58
Compare
@bruvzg You're the best! |
This may not be cheap AFAIK and should be benchmarked on different hardware / platforms imo. |
A (fashionably late) follow-up to #91333. This makes so that window transparency is always enabled in the editor itself, which is necessary for popups to have shadows.
Requires #106344 (see below).