-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
WebGPURenderer: Support BatchedMesh
.
#27937
WebGPURenderer: Support BatchedMesh
.
#27937
Conversation
Which reminds me that maybe we should add the /cc @sunag |
@vegarringdal I guess 20k instances doesn't seems enough to see noticeable differences. My numbers comes from a sample of 40k instances. Also I don't want to burn the CPUs of developers so I guess 20k is a good limit. |
This reverts commit 7059b85.
K, would nice to be able can compare performance with minimal work. But anyways, thanks for helping making the webgpu part more complete 👍 |
BatchedMesh
.
Something broke this feature... https://threejs.org/examples/?q=batch#webgpu_mesh_batch If I set Seems like only the WebGPU bakend broke though... |
Will check! Probably just an issue with the example or the |
Related issue: #22376
Description
This PR adds BatchMesh support to the WebGPURenderer on both backends. At this moment the WebGPU doesn't use any multi draw, let's add it once multiDrawIndirect is available (more info gpuweb/gpuweb#2315).
On my MacBook Pro M1 Max:
WebGPU: 120fps+, 4ms CPU average, 5GPU
WebGL: 65 fps, 7.6ms CPU, 5GPU
Example:
https://raw.githack.com/renaudrohlinger/three.js/utsubo/feat/webgpu-batch/examples/webgpu_mesh_batch.html
Also fixed some issue regarding timestamps getting reset when computeAsync wasn't being used.
Finally, I refactored the
WebGLBackend
withWebGLBufferRenderer
.This contribution is funded by Utsubo