Skip to content

PassNode: Fix depthTexture creation when depthBuffer: false#33239

Open
thelazylamaGit wants to merge 3 commits intomrdoob:devfrom
thelazylamaGit:PassNodeOptionalDepth
Open

PassNode: Fix depthTexture creation when depthBuffer: false#33239
thelazylamaGit wants to merge 3 commits intomrdoob:devfrom
thelazylamaGit:PassNodeOptionalDepth

Conversation

@thelazylamaGit
Copy link
Copy Markdown
Contributor

With PassNode a depth texture was always being created even when explicitly setting { depthBuffer: false }.

Additonally, Textures.updateRenderTarget() also handled depth before checking whether it was actually enabled. Because of that, a depth texture could end up being created even with depth disabled.

This pr ensures that when creating a pass such as

pass(this.scene, this.camera, { depthBuffer: false }))

no depth texture is created.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

📦 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.22
175.54
633.33
175.58
+113 B
+32 B
WebGPU Nodes 631.34
175.25
631.45
175.28
+113 B
+31 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.21
120.03
+0 B
+0 B
WebGPU 705.25
190.44
705.36
190.46
+113 B
+21 B
WebGPU Nodes 654.47
177.68
654.58
177.71
+113 B
+22 B

@sunag sunag added this to the r185 milestone Mar 27, 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