Skip to content

WebGPURenderer: Fix shadow comparison on Adreno GPUs#32548

Merged
sunag merged 9 commits intomrdoob:devfrom
sunag:dev-fix-shadows-webgpu
Dec 14, 2025
Merged

WebGPURenderer: Fix shadow comparison on Adreno GPUs#32548
sunag merged 9 commits intomrdoob:devfrom
sunag:dev-fix-shadows-webgpu

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented Dec 13, 2025

Related issue: #32547

Description

The PR improves support for TextureNode.compare() by adding a fallback that will use step() if the hardware has compatibility issues. Currently, compatibility is checked by verifying if the device is Android; if so, the fallback will be used.

  • Fixes shadow rendering issues on Android devices with Adreno GPUs (Samsung Galaxy S23/S25/Fold7, Xiaomi 10T Pro, etc.) when using WebGPURenderer.
  • Add Renderer.hasCompatibility() and THREE.Compatibility.TEXTURE_COMPARE
  • Add support for sample CubeDepthTexture, this will be necessary for the inspector's shadow update too.

@github-actions
Copy link

github-actions bot commented Dec 13, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 355.12
84.44
355.13
84.44
+14 B
+7 B
WebGPU 616.54
171.12
617.78
171.57
+1.24 kB
+452 B
WebGPU Nodes 615.14
170.85
616.39
171.32
+1.24 kB
+469 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 487.3
119.32
487.3
119.32
+0 B
+0 B
WebGPU 687.29
186.66
688.4
187.01
+1.11 kB
+347 B
WebGPU Nodes 637.13
173.88
638.24
174.21
+1.11 kB
+330 B

@mrdoob
Copy link
Owner

mrdoob commented Dec 14, 2025

/fyi @greggman @kenrussell

@sunag sunag marked this pull request as ready for review December 14, 2025 14:47
@sunag sunag merged commit b1bddc9 into mrdoob:dev Dec 14, 2025
10 checks passed
@sunag sunag deleted the dev-fix-shadows-webgpu branch December 14, 2025 14:52
@greggman
Copy link
Contributor

greggman commented Dec 16, 2025

Thanks for the ping. Can you share what the actual bug is and how step fixes it?

never mind I think. The link in the first comment covers it

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.

3 participants