Skip to content
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: Fix InstancedMesh init with 0 instance #29399

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

RenaudRohlinger
Copy link
Collaborator

@RenaudRohlinger RenaudRohlinger commented Sep 12, 2024

Description
Initializing an InstancedMesh with count = 0 breaks in both backends. This PR fixes the issue by creating a uniform buffer of a minimum of size 1.
image

This contribution is funded by Segments.AI & Utsubo

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 685.83
169.75
685.83
169.75
+0 B
+0 B
WebGPU 828.45
222.25
828.46
222.25
+12 B
+3 B
WebGPU Nodes 828.03
222.16
828.04
222.16
+12 B
+3 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 462.42
111.53
462.42
111.53
+0 B
+0 B
WebGPU 526.43
141.9
526.44
141.91
+12 B
+2 B
WebGPU Nodes 483.08
131.72
483.1
131.72
+12 B
+2 B

@sunag sunag added this to the r169 milestone Sep 12, 2024
@sunag sunag merged commit ddadd04 into mrdoob:dev Sep 12, 2024
12 checks passed
LD2Studio pushed a commit to LD2Studio/LD2Studio-Editor that referenced this pull request Sep 13, 2024
LD2Studio pushed a commit to LD2Studio/LD2Studio-Editor that referenced this pull request Sep 13, 2024
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.

2 participants