-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Description
Description
Removing a map assigned to a spot light triggers a runtime error:
three.webgpu.js:26114 Uncaught TypeError: Invalid value used as weak map key
at WeakMap.set ()
at Textures.get (three.webgpu.js:26114:14)
at Textures.updateTexture (three.webgpu.js:28797:28)
at Bindings._update (three.webgpu.js:27704:20)
at Bindings._updateBindings (three.webgpu.js:27606:9)
at Bindings.updateForRender (three.webgpu.js:27593:8)
at WebGPURenderer._renderObjectDirect (three.webgpu.js:52189:19)
at WebGPURenderer.renderObject (three.webgpu.js:52128:9)
at WebGPURenderer._renderObjects (three.webgpu.js:52043:9)
at WebGPURenderer._renderScene (three.webgpu.js:50726:64)
I believe this happens since the renderer does not detect a new render object with a new node builder state is required in that case.
Reproduction steps
- Open https://threejs.org/examples/webgpu_lights_spotlight
- Use the GUI to change the map to
null
. - Observe runtime error in browser console.
Code
see live example
Live example
https://threejs.org/examples/webgpu_lights_spotlight
Expected behavior visible in: https://threejs.org/examples/webgl_lights_spotlight
Screenshots
No response
Version
r175dev
Device
No response
Browser
No response
OS
No response