Skip to content

Imported SVG semi-transparent areas become fully opaque #83611

Closed
@lostminds

Description

@lostminds

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions