Skip to content

WebGPURenderer: Compute Texture 3D Example #31337

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
merged 2 commits into from
Jun 30, 2025

Conversation

RenaudRohlinger
Copy link
Collaborator

@RenaudRohlinger RenaudRohlinger commented Jun 30, 2025

Related

Description
StorageTexture3D was failing in TSL so I finished the implementation and added an example:

Screen Recording 2025-06-30 at 21 11 41

This contribution is funded by Utsubo

FYI @Spiri0, and thanks for the prior work.

Copy link

github-actions bot commented Jun 30, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.69
78.76
337.69
78.76
+0 B
+0 B
WebGPU 557.18
154.29
557.35
154.34
+169 B
+47 B
WebGPU Nodes 556.1
154.07
556.27
154.12
+169 B
+46 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 468.91
113.45
468.91
113.45
+0 B
+0 B
WebGPU 632.84
171.31
632.98
171.34
+133 B
+28 B
WebGPU Nodes 587.98
160.66
588.11
160.69
+133 B
+29 B

@mrdoob mrdoob requested a review from sunag June 30, 2025 12:44
@sunag sunag added this to the r179 milestone Jun 30, 2025
@sunag sunag merged commit e9277b2 into mrdoob:dev Jun 30, 2025
12 checks passed
@Spiri0
Copy link
Contributor

Spiri0 commented Jun 30, 2025

@RenaudRohlinger
A nice example. That's exactly what I wanted the storage3DTexture for, I mean, for gaslike objects. However, I only implemented it for wgslFn because I don't understand TSL very well yet. I also created the storageArrayTexture only for wgslFn. If you'd like, you can adapt it for TSL as well.

@linbingquan
Copy link
Contributor

I found error: Uncaught (in promise) Error: Uniform "storageTexture" not declared. in browser dev tool.

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.

4 participants