Skip to content

feat(demo): three.js yard drawn as Meshes, a BatchedMesh and InstancedMeshes - #217

Merged
triniwiz merged 1 commit into
masterfrom
feat/three-batched-mesh-demo
Nov 14, 2026
Merged

triniwiz merged 1 commit into
masterfrom
feat/three-batched-mesh-demo

Conversation

@triniwiz

Copy link
Copy Markdown
Member

tools/demo/canvas-three/examples/webgpu_batched_mesh.ts: the same yard of parts on WebGPURenderer in three draw modes, switchable at run time, reporting fps, per-frame draw calls and median render time once a second. Registered in the three demo list as webgpu_batched_mesh, which cycles the modes every 10 s and logs the stats.

Same scene on the Linux build (Intel, frames driven by a timer so fps is CPU-bound), median renderer.render() time:

parts Meshes BatchedMesh InstancedMesh
768 675 draws, 14.1 ms 675 draws, 2.7 ms 13 draws, 1.9 ms
3072 1558 draws, 33.8 ms 1558 draws, 2.5 ms 13 draws, 2.4 ms

BatchedMesh still issues one draw per visible part on WebGPU (three has no multi-draw there), but with no bind group, pipeline or uniform upload between them, so the per-part cost is the draw call alone.

…dMeshes

The same parts on WebGPURenderer in three draw modes, switchable at run
time, with fps, draw calls and render time reported once a second. It
shows what batching saves on a scene that would otherwise issue one draw,
bind group and uniform upload per part.
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 765a52f5-105d-4ae8-8e3a-2ba3c15fd789

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@triniwiz
triniwiz merged commit 467db6e into master Nov 14, 2026
26 of 27 checks passed
@triniwiz
triniwiz deleted the feat/three-batched-mesh-demo branch November 14, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant