Skip to content

Fix the output pass cache for multi-canvas rendering#33209

Closed
arodic wants to merge 1 commit intomrdoob:devfrom
io-gui:fixes/multi-canvas-cache
Closed

Fix the output pass cache for multi-canvas rendering#33209
arodic wants to merge 1 commit intomrdoob:devfrom
io-gui:fixes/multi-canvas-cache

Conversation

@arodic
Copy link
Copy Markdown
Contributor

@arodic arodic commented Mar 18, 2026

Related issue: #32689

Description

#32690 introduced regression that caused webgpu_multiple_canvas to render same output to all canvases where each canvas should have unique output buffer.

the problem is that this line returns false negative because it only represents output config from getOutputCacheKey(): tone mapping, color space, XR state It does not encode which texture is currently bound

return cacheKey !== this.getOutputCacheKey();

This fix, however feels more like a band-aid rather than something that addresses the real issue. The caching mechanism relies on a cacheKey that does not correctly check for the identity of the target being cached.

I'm submitting this as draft and looking for better solution.

@github-actions
Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.97
85.53
359.97
85.53
+0 B
+0 B
WebGPU 632.13
175.39
632.27
175.42
+134 B
+31 B
WebGPU Nodes 630.25
175.1
630.38
175.13
+134 B
+30 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 492.17
120.11
492.17
120.11
+0 B
+0 B
WebGPU 704.56
190.19
704.7
190.22
+134 B
+28 B
WebGPU Nodes 653.78
177.6
653.92
177.67
+134 B
+72 B

@sunag
Copy link
Copy Markdown
Collaborator

sunag commented Mar 25, 2026

Closing in favor of #33228

@sunag sunag closed this Mar 25, 2026
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