Skip to content

NodeMaterialObserver: Fix missing intensity uniform updates. #31120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented May 16, 2025

Related issue: -

Description

The PR adds the possibility to update the light map intensity in webgpu_materials_lightmap so it's easier to see the impact of a light map. That revealed a bug in the node material since only one material was updated (for the red stone).

Turns out when multiple materials share the same node builder state, uniform updates were missed because certain *intensity material properties were not racked by NodeMaterialObserver.

Since the builds are not updated, the bug can be produced with: https://rawcdn.githack.com/Mugen87/three.js/dev1/examples/webgpu_materials_lightmap.html

@Mugen87 Mugen87 added this to the r177 milestone May 16, 2025
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.26
78.64
337.26
78.64
+0 B
+0 B
WebGPU 550.09
152.49
550.17
152.5
+75 B
+13 B
WebGPU Nodes 549.45
152.33
549.52
152.34
+75 B
+13 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 468.12
113.14
468.12
113.14
+0 B
+0 B
WebGPU 625.46
169.27
625.54
169.28
+75 B
+12 B
WebGPU Nodes 580.32
158.58
580.39
158.59
+75 B
+13 B

@Mugen87 Mugen87 merged commit 5bf53ee into mrdoob:dev May 16, 2025
12 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.

1 participant