-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Var transparent mode #444
Var transparent mode #444
Conversation
Refactored CreateNewImage dialog and added portrait & landscape butto…
Added the transparency methods plus modified fullscreen such that it resets transparency on toggling hence, Removing the issue of blackness
For sure you're not blending colors correctly: Not opaque image (100% transparent mode)It's too dark, blending with the white background shouldn't make it darker.Setting blending mode to premultiplied alpha for the main ViewportContainer seems to fix it: |
it is not a bug. If you look at the code, the transparency does not affect the image(even a little bit), it only effects the TransparentChecker.shader and the background. |
however it does seem to get the job done so i am going to add it |
Image can be transparent and thus its colors are already multiplied by alpha of the layers etc. So if you're changing Viewport's background to be transparent you need to take into account that the alpha was already applied to the image (RGB values of the image are already multiplied by the alpha). Otherwise you'll end up with the darker colors when |
yes i found it just now and am enabling material.blend_mode = CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA thanks for letting me know |
Fixed the bug that darkens image when decreasing opacity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be working well, good job! I left some comments too, and I would also like to propose to change "Transparency Mode" to "Window Transparency", in order to make what the option does more obvious to the user. As for the option's UI, I'm still unsure if this is a good place for it, but I suppose we could leave it as it is for now, and we could change it in the future if we think of something better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right, awesome, thank you!
I modified my earlier version a little bit so that it would reset to zero in full screen mode hence removing the blackness issue