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

Saving a VRAM Compressed image is broken in 4.3-dev after RenderingDevice refactor #86628

Closed
aaronfranke opened this issue Dec 30, 2023 · 3 comments · Fixed by #86855
Closed

Comments

@aaronfranke
Copy link
Member

aaronfranke commented Dec 30, 2023

Tested versions

The issue occurs in the latest master (13a0d6e), it occurs with #83452's merge commit (3a8524d), and all commits I tested between those. The issue does not occur with commits before #83452's merge commit, including 4.2-stable.

System information

macOS 14.2.1, Apple M1 Pro

Issue description

Saving VRAM Compressed images is broken in 4.3-dev as of #83452. I noticed this bug when I tried to export a GLTF scene from Godot and the image data was extremely distorted.

Steps to reproduce

  1. Run the minimal reproduction project, which has icon.svg imported as VRAM Compressed, and has this code:
const ICON = preload("res://icon.svg")

func _ready():
	ICON.get_image().save_png("res://output.png")
  1. With the latest master, 83452, and commits between, this image is output:

output

  1. With 4.2-stable and commits before 83452, this image is output:

output

Minimal reproduction project (MRP)

imgsave.zip

@DarioSamo
Copy link
Contributor

DarioSamo commented Jan 2, 2024

I did a quick test since I saw some possibly related code while fixing the render graph in one of the rebase, but it's still corrupted as well on my branch.

It's probably worth mentioning the thumbnail if icon.svg also seems to have the same corruption.

@lyuma
Copy link
Contributor

lyuma commented Jan 12, 2024

This issue also breaks all scenes exported as glTF in Godot 4.2

broken textures on exported gltf

@clayjohn
Copy link
Member

@lyuma Can you confirm that the fix in #86855 works?

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.

5 participants