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: WGSL Fix calculation of instanceIndex in compute shaders #28865

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

RenaudRohlinger
Copy link
Collaborator

Related issue: #28846

Description

The current implementation of instanceIndex only uses global_invocation_id.x, which doesn't work with the new Y and Z dimensions. This PR addresses the issue by updating the WGSL behavior of dispatchWorkgroups in the WebGPU backend. This ensures correct functionality when the number of particles exceeds maxComputeWorkgroupsPerDimension.

This contribution is funded by Utsubo

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
683.5 kB (169.2 kB) 683.5 kB (169.2 kB) +0 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
460.7 kB (111.1 kB) 460.7 kB (111.1 kB) +0 B
@RenaudRohlinger RenaudRohlinger added this to the r167 milestone Jul 14, 2024
@sunag sunag merged commit ab8f885 into mrdoob:dev Jul 14, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants