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

  1. init WebGPURenderer
  2. GlTFLoader.load(“XXXX.glb”)
  3. WebGPURenderer.render()

Code

// code goes here

Live example

web-gpu3d-preview

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)

Most upvoted comments

I found the main problem, it is still related to the NodeBuilder cache, the optimization will have to be done using customProgramCacheKey() with some improvements too. Currently, if we create 3 x MeshStandardMaterial with identical settings it runs NodeBuilder 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?

Is there any new progress

This improvement is being discussed here with others related.

Do you mind sharing your code at GitHub? The zip download at gitee only works with an account and the clone via git takes ages because of a low downloading speed.

I’ve shared it on GitHub,see:WebGPU3dPreview