diff --git a/examples/files.json b/examples/files.json index bd549c1a22bf01..6fc19da4a791cb 100644 --- a/examples/files.json +++ b/examples/files.json @@ -312,6 +312,7 @@ "webgpu_compute_particles_rain", "webgpu_compute_particles_snow", "webgpu_compute_points", + "webgpu_compute_prefix_sums", "webgpu_compute_sort_bitonic", "webgpu_compute_texture", "webgpu_compute_texture_pingpong", diff --git a/examples/screenshots/webgpu_compute_prefix_sums.jpg b/examples/screenshots/webgpu_compute_prefix_sums.jpg new file mode 100644 index 00000000000000..feabfb2f71420d Binary files /dev/null and b/examples/screenshots/webgpu_compute_prefix_sums.jpg differ diff --git a/examples/webgpu_compute_prefix_sums.html b/examples/webgpu_compute_prefix_sums.html new file mode 100644 index 00000000000000..019c3d0f7b7d43 --- /dev/null +++ b/examples/webgpu_compute_prefix_sums.html @@ -0,0 +1,517 @@ + + + three.js webgpu - storage pbo external element + + + + + + +
+ three.js +
Three.js TSL implemtations of multiple prefix sum algorithms. +
Each display loops through an initialization, sum, and validation step. +
Reference implementations and resources by b0nes164 +
+
+
+
+ + + + + + \ No newline at end of file diff --git a/examples/webgpu_compute_sort_bitonic.html b/examples/webgpu_compute_sort_bitonic.html index c3204f5ed03765..d68fdf9c9a73da 100644 --- a/examples/webgpu_compute_sort_bitonic.html +++ b/examples/webgpu_compute_sort_bitonic.html @@ -494,22 +494,22 @@ if ( currentStep !== MAX_STEPS ) { - renderer.compute( computeBitonicStep ); + await renderer.computeAsync( computeBitonicStep ); if ( nextStepGlobal ) { - renderer.compute( computeAlignCurrent ); + await renderer.computeAsync( computeAlignCurrent ); } - renderer.compute( computeSetAlgo ); + await renderer.computeAsync( computeSetAlgo ); currentStep ++; } else { - renderer.compute( computeResetBuffers ); - renderer.compute( computeResetAlgo ); + await renderer.computeAsync( computeResetBuffers ); + await renderer.computeAsync( computeResetAlgo ); currentStep = 0;