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

Imported SVG semi-transparent areas become fully opaque #83611

Closed
lostminds opened this issue Oct 19, 2023 · 2 comments · Fixed by #83656
Closed

Imported SVG semi-transparent areas become fully opaque #83611

lostminds opened this issue Oct 19, 2023 · 2 comments · Fixed by #83656

Comments

@lostminds
Copy link

lostminds commented Oct 19, 2023

Godot version

4.2beta1

System information

macOS 13.6.0 - Vulkan (Mobile) - integrated Apple M2 Pro - Apple M2 Pro (10 Threads)

Issue description

Importing SVGs (via editor or in code using the Image.load_svg_from_string() etc) that have semi-transparent areas result in these areas being fully opaque instead of having the expected semi-transparent alpha values.

Left imported svg in Godot, right same svg in Firefox

Screenshot 2023-10-19 at 12 48 35

This seems this is an issue with ThorVG as the same issue is present in their viewer. So I've opened an issue there as well ( thorvg/thorvg#1716 ). But since this affects Godot I'm opening this here so it's known and we can keep track of the issue.
If you don't want these kinds of double issues feel free to just close this.

EDIT: Here's a better example image showing off the issue, made by @capnm, where you can see that the alpha is also incorrect in the overlapping area.
276603482-08b69b8c-1f4c-4319-ba18-c635c07db42b

Steps to reproduce

Import the following svg image into a godot project

OpacityTest

Minimal reproduction project

see image file above

@lostminds
Copy link
Author

Looks like the issue has been fixed on the ThorVG side now and a new 0.11.2 release is available that we can update to in Godot to hopefully fix this issue.

@capnm
Copy link
Contributor

capnm commented Oct 20, 2023

Godot + v0.11.2
Screenshot from 2023-10-20 07-59-44

PNG
Screenshot from 2023-10-20 07-23-34

SVG
83611_opacity_test

@akien-mga akien-mga added this to the 4.2 milestone Oct 20, 2023
ProbablyWorks pushed a commit to ProbablyWorks/godot that referenced this issue Oct 22, 2023
https://github.com/thorvg/thorvg/releases/tag/v0.11.2

Godot related:
+ [JPG] Fixed a regression bug that previously disrupted image decoding.
+ [SwEngine] Resolved a default alpha blending bug.

Fixes godotengine#83611 alpha blending.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants