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

TextureUtils: Fix invalid texture data after decompression. #27137

Merged
merged 1 commit into from Nov 7, 2023

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 7, 2023

Related issue: #27100

Description

When directly calling forceContextLoss() after the decompression, the renderer's canvas gets invalid before the export happens. Hence, decompress() creates a new canvas now and copies the contents from the renderer's DOM element. This is the same way the editor handles compressed textures in its renderToCanvas() helper function.

@Mugen87 Mugen87 added this to the r159 milestone Nov 7, 2023
@Mugen87 Mugen87 merged commit d4c01b9 into mrdoob:dev Nov 7, 2023
16 of 18 checks passed
@Dadibom
Copy link
Contributor

Dadibom commented Nov 7, 2023

👍

Are these changes published somewhere so I can test?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Nov 7, 2023

You can use rawgit for testing. The dev URLs are:

Export: https://rawcdn.githack.com/mrdoob/three.js/dev/examples/misc_exporter_gltf.html
Import: https://rawcdn.githack.com/mrdoob/three.js/dev/editor/index.html

Be aware that sometimes old code might be cached when using rawgit. If you want to be on the safe side, use commit hashes inside the URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants