WebGPU on Barth Cavehttps://barthpaleologue.github.io/Blog/tags/webgpu/Recent content in WebGPU on Barth CaveHugo -- gohugo.ioenbarth@paleologue.fr (Barthélemy Paléologue)barth@paleologue.fr (Barthélemy Paléologue)Wed, 20 Mar 2024 15:44:02 +0100Ocean Simulation with FFT and WebGPUhttps://barthpaleologue.github.io/Blog/posts/ocean-simulation-webgpu/Wed, 20 Mar 2024 15:44:02 +0100barth@paleologue.fr (Barthélemy Paléologue)https://barthpaleologue.github.io/Blog/posts/ocean-simulation-webgpu/Introduction It’s been a few month since I started pondering making a better ocean for Cosmos Journeyer’s procedural planets. To have actual waves moving around and not just a scrolling normal maps would make a significant difference in visual quality.
Coincidentally, I was also taking a course on computer animation (INF585) at Ecole Polytechnique, and I had the opportunity to choose my final project. Long stroy short, I decided to implement Jerry Tessendorf’s FFT-based ocean simulation on WebGPU, and this is my project report.The Compute Shader Tutorial #2https://barthpaleologue.github.io/Blog/posts/the-compute-shader-tutorlal-2/Sun, 03 Dec 2023 19:48:00 +0100barth@paleologue.fr (Barthélemy Paléologue)https://barthpaleologue.github.io/Blog/posts/the-compute-shader-tutorlal-2/Hello again! This is the second part of my compute shader series. If you haven’t read the first part yet, you can find it here.
Now that we know how to create simple compute shaders, we will see how to parameterize them with uniforms.
Uniformity at its finest
No, not that kind of uniform!
What are shader uniforms? Last time we added 2 arrays on the GPU. What if we wanted to add the first one to twice the second one?The Compute Shader Tutorial #1https://barthpaleologue.github.io/Blog/posts/the-compute-shader-tutorial-1/Sun, 26 Nov 2023 20:59:27 +0100barth@paleologue.fr (Barthélemy Paléologue)https://barthpaleologue.github.io/Blog/posts/the-compute-shader-tutorial-1/Welcome to my tutorial on compute shaders using WebGPU and BabylonJS! It is meant to be accessible to beginers and then to provide concrete use cases of compute shaders in the context of terrain generation and grass rendering.
What is a compute shader? Let’s say you have an array of numbers like this:
let numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; Now if you want to add 1 to each number, you can do it like this: