Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jan 16, 2025

Fixes #30326.

Description

This PR makes sure image/png is always used in getDataURL() to avoid quality and transparency issues when serializing large images.

As mentioned in #30326 (comment), the JPG fallback was implemented when texture serialization was initially developed ten years ago. In the meanwhile, hardware should be capable to handle images uniformly as image/png.

@github-actions
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.53
79.09
339.53
79.09
+0 B
+0 B
WebGPU 493.61
137.21
493.61
137.21
+0 B
+0 B
WebGPU Nodes 493.08
137.1
493.08
137.1
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.41
112.16
465.25
112.11
-153 B
-55 B
WebGPU 564.15
152.87
563.99
152.81
-153 B
-59 B
WebGPU Nodes 519.53
142.45
519.38
142.39
-153 B
-59 B

@mrdoob mrdoob added this to the r173 milestone Jan 16, 2025
@Mugen87 Mugen87 merged commit 2eff1b9 into mrdoob:dev Jan 17, 2025
11 of 12 checks passed
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.

Disable jpg conversion for performance reason

2 participants