Skip to content

Conversation

@mrxz
Copy link
Contributor

@mrxz mrxz commented Jul 22, 2025

Related issue: #30151

Description

Adds support for 2d array textures and 3d textures when using multiple render targets. The setupRenderTarget method in WebGLTextures made the assumption that for multipleRenderTargets (textures.length > 1) the individual textures would be TEXTURE_2D. This is changed to also handle TEXTURE_2D_ARRAY and TEXTURE_3D.

The layer passed to setRenderTarget is used for all targets. Binding different layers as touched upon in #30151 is not part of this PR.

This contribution is funded by Fern Solutions

@github-actions
Copy link

github-actions bot commented Jul 22, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.92
78.83
338.12
78.86
+200 B
+27 B
WebGPU 560.22
155.1
560.22
155.1
+0 B
+0 B
WebGPU Nodes 559.14
154.89
559.14
154.89
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 469.19
113.49
469.39
113.53
+200 B
+33 B
WebGPU 635.38
172.03
635.38
172.03
+0 B
+0 B
WebGPU Nodes 590.03
161.27
590.03
161.27
+0 B
+0 B

@mrxz mrxz force-pushed the array-texture-mrt branch from e63a1af to a4525f2 Compare July 22, 2025 12:36
@Mugen87 Mugen87 added this to the r179 milestone Jul 22, 2025
@Mugen87 Mugen87 merged commit 0fbb338 into mrdoob:dev Jul 22, 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.

2 participants