Skip to content

Conversation

@shotamatsuda
Copy link
Contributor

Fixes: #31807

Description

This PR changes the implementation of copyTextureToTexture for WebGLBackend so that it aligns with the one in WebGLRenderer.

It does not handle uninitialized textures the way WebGLRenderer does, because it's out of my hands.

@github-actions
Copy link

github-actions bot commented Sep 3, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.91
79.11
338.91
79.11
+0 B
+0 B
WebGPU 579.78
159.79
581.18
160.03
+1.4 kB
+240 B
WebGPU Nodes 578.39
159.55
579.79
159.79
+1.4 kB
+239 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 470.78
113.9
470.78
113.9
+0 B
+0 B
WebGPU 649.44
175.54
650.84
175.78
+1.4 kB
+236 B
WebGPU Nodes 603.54
164.69
604.94
164.92
+1.4 kB
+231 B

@shotamatsuda shotamatsuda marked this pull request as ready for review September 3, 2025 11:35
@Mugen87 Mugen87 added this to the r181 milestone Sep 3, 2025
@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 3, 2025

This PR also fixes the below runtime error that I originally wanted to investigate the next days^^:

Uncaught TypeError: WeakMap key undefined must be an object

It did occur in the first frame in certain examples like webgpu_postprocessing_traa.

@shotamatsuda
Copy link
Contributor Author

Oh, fancy that I've just been debugging the same error in my TAA (depth texture on my end) 😄

@Mugen87 Mugen87 merged commit b8cfbe2 into mrdoob:dev Sep 3, 2025
9 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.

WebGLBackend: copyTextureToTexture doesn't copy all layers of 3D render targets

2 participants