Skip to content

WebGPURenderer: Compute Texture 3D Example#31337

Merged
sunag merged 2 commits into
mrdoob:devfrom
RenaudRohlinger:utsubo/feat/storage3d-compute
Jun 30, 2025
Merged

WebGPURenderer: Compute Texture 3D Example#31337
sunag merged 2 commits into
mrdoob:devfrom
RenaudRohlinger:utsubo/feat/storage3d-compute

Conversation

@RenaudRohlinger

@RenaudRohlinger RenaudRohlinger commented Jun 30, 2025

Copy link
Copy Markdown
Collaborator

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.

@github-actions

github-actions Bot commented Jun 30, 2025

Copy link
Copy Markdown

📦 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

Comment thread examples/webgpu_compute_curlnoise_utsubo.html Fixed
Comment thread examples/webgpu_compute_curlnoise_utsubo.html Fixed
Comment thread examples/webgpu_compute_curlnoise_utsubo.html Fixed
Comment thread examples/webgpu_compute_curlnoise_utsubo.html Fixed
Comment thread examples/webgpu_compute_curlnoise_utsubo.html Fixed
@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

Spiri0 commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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.

5 participants