three.js: The WebGPURenderer causes the browser to crash while loading the glb model
Description
I found that when I used WebGPURenderer to load the glb model, the browser would crash. Under webgl is normal! I made a simple example,see: web-gpu3d-preview
Reproduction steps
- init WebGPURenderer
- GlTFLoader.load(“XXXX.glb”)
- WebGPURenderer.render()
Code
// code goes here
Live example
Screenshots
No response
Version
r154
Device
Desktop
Browser
Chrome
OS
Windows
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 18 (2 by maintainers)
I found the main problem, it is still related to the
NodeBuilder
cache, the optimization will have to be done usingcustomProgramCacheKey()
with some improvements too. Currently, if we create 3 xMeshStandardMaterial
with identical settings it runsNodeBuilder
3 times, this can be a problem with scenes like this where there are a huge number of materials with the same type just with different colors. I will be working on this improvement, to keep the high customization of materials in line with this optimization.@mrdoob I’ll be checking this out, @Mugen87 I will reopen until I’m more satisfied with the optimization results I’m working on, this PR could be a good benchmark.
@mlt131220 Could you test again?
This improvement is being discussed here with others related.
I’ve shared it on GitHub,see:WebGPU3dPreview