Skip to content

Conversation

shotamatsuda
Copy link
Contributor

@shotamatsuda shotamatsuda commented Aug 27, 2025

Fixed #31759.

Description

This PR fixes TextureNode.load() incorrectly returns vec4 when sampling a depth texture on WebGL fallback.

Copy link

github-actions bot commented Aug 27, 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 578.34
159.33
578.39
159.34
+48 B
+19 B
WebGPU Nodes 576.95
159.08
577
159.1
+48 B
+19 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 648.88
175.35
648.93
175.37
+48 B
+19 B
WebGPU Nodes 602.97
164.48
603.02
164.5
+48 B
+19 B

@Mugen87 Mugen87 added this to the r180 milestone Aug 27, 2025
Mugen87
Mugen87 previously approved these changes Aug 27, 2025
@Mugen87 Mugen87 changed the title TSL: Add a swizzle when sampling a depth texture GLSLNodeBuilder: Fix texelFetch*() code generation with depth textures. Aug 27, 2025
@shotamatsuda shotamatsuda marked this pull request as ready for review August 27, 2025 13:02
@Mugen87 Mugen87 merged commit 4047f2e into mrdoob:dev Aug 27, 2025
9 checks passed
@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 28, 2025

@shotamatsuda Could you please open a new PR with your changes to fix generateTexture()? I'm afraid the issue became not clear when trying to explain it in #30830 (comment). A new PR would help to launch a new discussion.

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.

TSL: Mismatched type assignment from pass texture on WebGL fallback
2 participants