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

Nodes: Add AtomicFunctionNode #29385

Merged
merged 3 commits into from
Sep 17, 2024
Merged

Nodes: Add AtomicFunctionNode #29385

merged 3 commits into from
Sep 17, 2024

Conversation

cmhhelgeson
Copy link
Contributor

Description

Adds the ability to execute atomic functions from within compute shaders. A total swaps indicator has been added to the UI of Compute Bitonic Sort.

image

Copy link

github-actions bot commented Sep 10, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 685.94
169.78
685.94
169.78
+0 B
+0 B
WebGPU 833.38
223.44
834.9
223.91
+1.52 kB
+464 B
WebGPU Nodes 832.89
223.32
834.41
223.78
+1.52 kB
+463 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 462.29
111.52
462.29
111.52
+0 B
+0 B
WebGPU 530.84
143.04
531.72
143.33
+885 B
+290 B
WebGPU Nodes 487.5
132.9
488.38
133.2
+885 B
+298 B

@cmhhelgeson cmhhelgeson marked this pull request as draft September 10, 2024 23:41
@cmhhelgeson
Copy link
Contributor Author

Converting to draft since atomic operations actually need to be able to be assigned to variables.

@cmhhelgeson cmhhelgeson marked this pull request as ready for review September 12, 2024 23:03
@cmhhelgeson
Copy link
Contributor Author

The solution I arrived at was just adding a storeNode to each of the atomic functions similar to how storageTexture works, which isn't ideal but at least seems cleaner to me.

@sunag sunag added this to the r169 milestone Sep 13, 2024
@sunag sunag merged commit 38fd5e9 into mrdoob:dev Sep 17, 2024
12 checks passed
This pull request was closed.
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