Skip to content

Conversation

@ahaensler
Copy link
Contributor

Related issue: none, see below

Description

The WebGL fallback always uploads the complete array texture. That's too slow when I only change some layers.

The PR enables partial uploads using texture.layerUpdates.

@github-actions
Copy link

github-actions bot commented Aug 6, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.63
79.03
338.63
79.03
+0 B
+0 B
WebGPU 567.42
156.92
567.73
157.03
+305 B
+105 B
WebGPU Nodes 566.03
156.68
566.33
156.78
+305 B
+106 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 470.38
113.78
470.38
113.78
+0 B
+0 B
WebGPU 639.16
172.99
641.46
173.51
+2.3 kB
+521 B
WebGPU Nodes 593.81
162.25
596.11
162.81
+2.3 kB
+553 B

@Mugen87 Mugen87 added this to the r180 milestone Aug 6, 2025
@Mugen87 Mugen87 changed the title webgl-fallback: honor layerUpdates for array textures WebGLBackend:Hhonor layerUpdates for array textures. Aug 6, 2025
@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 6, 2025

Additional info: This code was already present in WebGLRenderer and has now been ported to the WebGL backend as well.

@Mugen87 Mugen87 merged commit 128c054 into mrdoob:dev Aug 6, 2025
9 checks passed
@Mugen87 Mugen87 changed the title WebGLBackend:Hhonor layerUpdates for array textures. WebGLBackend: Honor layerUpdates for array textures. Aug 6, 2025
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.

2 participants