-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
BatchedMesh: Fix renderer.info.render
when using multidraw.
#29532
Conversation
renderer.info.render
data if use BatchedMesh._multiDraw
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
@CodyJasonBennett @Mugen87 |
It looks good to me. This should also be checked by @gkjohnson 🙌 . |
The three.js/src/renderers/webgl/WebGLBufferRenderer.js Lines 72 to 76 in 1841e38
And I'm less familiar with the WebGPURenderer but it looks like the primitives aren't correctly counted in that case, either: three.js/src/renderers/webgpu/WebGPUBackend.js Lines 952 to 959 in 1841e38
|
Looking at this a bit more it looks like WebGPURenderer has a fairly limited implementation of BatchedMesh (it's issuing new draw calls for each sub geometry and doesn't support non-indexed geometry) so this may just be an artifact of the still in-progress WebGPU implementation. It looks like InstancedMesh is also not supported, yet. Though I may be misunderstanding something. |
fixed, thanks
is this relative to #29488? |
Seems likely - but again support for BatchedMesh in the WebGPU backend seems incomplete at the moment. If you can test it then it seems worth adding either way. |
Support for BatchedMesh in the WebGPU backend will be finalized with the completion of the indirect draw API (WIP: #29372). We'll also need to determine how to handle the statistics for indirect draw calls in renderer.info. Once we identify an appropriate way to represent these stats, we can make decisions on how to calculate the infos of the BatchedMesh in WebGPU I guess. Also related discussion: #29197 (comment) |
renderer.info.render
data if use BatchedMesh._multiDraw
renderer.info.render
when using multidraw.
Related issue: #29531
Description
info.update()
increases the draw calls by 1 for each call, and here it is called more than once.In addition, the number of triangles is not calculated correctly.
Edit: moved to draft to do more checking