Skip to content

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented Sep 10, 2025

Fixes #31872

Description

Add a cache to reuse the shadow nodes created from the material and update it if the material version is updated.

@sunag sunag added this to the r181 milestone Sep 10, 2025
@github-actions
Copy link

github-actions bot commented Sep 10, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.24
79.14
338.24
79.14
+0 B
+0 B
WebGPU 580.38
160.31
580.88
160.44
+491 B
+125 B
WebGPU Nodes 578.99
160.07
579.48
160.19
+491 B
+126 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 469.7
113.74
469.7
113.74
+0 B
+0 B
WebGPU 649.92
175.87
650.41
175.98
+491 B
+108 B
WebGPU Nodes 604.03
165.03
604.52
165.16
+491 B
+121 B

@sunag sunag marked this pull request as ready for review September 12, 2025 15:24
@sunag sunag merged commit aa3e118 into mrdoob:dev Sep 12, 2025
9 checks passed
@sunag sunag deleted the dev-cache-shadownodes branch September 12, 2025 21:03
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: Perfomance degradation when map and shadow map are used on materials

2 participants