Skip to content

RenderTarget: Preserve multiview in copy()#33285

Merged
Mugen87 merged 1 commit into
mrdoob:devfrom
Kundan-CR7:fix-render-target-multiview-copy
Mar 29, 2026
Merged

RenderTarget: Preserve multiview in copy()#33285
Mugen87 merged 1 commit into
mrdoob:devfrom
Kundan-CR7:fix-render-target-multiview-copy

Conversation

@Kundan-CR7

@Kundan-CR7 Kundan-CR7 commented Mar 29, 2026

Copy link
Copy Markdown

Fixed #33284

Description

The RenderTarget.copy() method does not copy the multiview property from the source instance.

The constructor initializes multiview using options.multiview, but it was missing in the copy() method. This leads to inconsistent behavior when cloning render targets configured with multiview enabled.

This PR fixes the issue by copying the multiview property:

this.multiview = source.multiview;

This ensures that cloned render targets retain the same configuration as the source.

@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 360.01
85.46
360.01
85.46
+0 B
+0 B
WebGPU 633.38
175.63
633.38
175.63
+0 B
+0 B
WebGPU Nodes 631.5
175.33
631.5
175.33
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 492.21
120.03
492.24
120.04
+27 B
+4 B
WebGPU 705.41
190.51
705.43
190.51
+27 B
+6 B
WebGPU Nodes 654.63
177.77
654.65
177.77
+27 B
+7 B

@Kundan-CR7

Copy link
Copy Markdown
Author

@Mugen87 please review this PR

@Mugen87 Mugen87 added this to the r184 milestone Mar 29, 2026
@Mugen87 Mugen87 merged commit 7a77bfe into mrdoob:dev Mar 29, 2026
10 checks passed
@mrdoob mrdoob changed the title Fix: preserve multiview in RenderTarget.copy() RenderTarget: Preserve multiview in copy() Apr 16, 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.

RenderTarget.copy() does not copy multiview property

2 participants