Skip to content

WebGPURenderer: Respect TypedArray in StorageInstancedBufferAttribute #30218

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

Merged

Conversation

RenaudRohlinger
Copy link
Collaborator

Description

Currently using instancedArray/attributeArray( data, 'uint') will always generate a float buffer regardless of the type argument. this PR fixes the issue by correctly generating a uint typed array.

This contribution is funded by Utsubo

@RenaudRohlinger RenaudRohlinger added this to the r172 milestone Dec 27, 2024
Copy link

github-actions bot commented Dec 27, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.44
79.06
339.44
79.06
+0 B
+0 B
WebGPU 488.88
135.69
489.26
135.79
+378 B
+108 B
WebGPU Nodes 488.35
135.56
488.73
135.67
+378 B
+110 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.3
112.11
465.3
112.11
+0 B
+0 B
WebGPU 558.8
151.3
558.8
151.3
+0 B
+0 B
WebGPU Nodes 514.87
141.08
514.87
141.08
+0 B
+0 B

@sunag sunag merged commit d24a6b4 into mrdoob:dev Dec 28, 2024
12 checks passed
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.

3 participants