Drop a realistic, GPU-accelerated ocean surface into a Three.js web scene.
Study how FFT-based ocean simulation and the JONSWAP wave model work in practice.
Experiment with wind, choppiness, foam, and sun position using the built-in control panel.
Use as a reference implementation for WebGPU compute shaders in the browser.
| owenyuwono/poseidon | bwilky/ha-spotify-browser | gangweix/next-forcing | |
|---|---|---|---|
| Stars | 50 | 50 | 51 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 4/5 | 2/5 | 5/5 |
| Audience | developer | general | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires a WebGPU-capable browser such as Chrome/Edge 113+ or Safari 18+, no fallback to older graphics APIs.
Poseidon is a real-time ocean simulation that runs in a web browser. It uses a technique called FFT (Fast Fourier Transform), which is a math tool that converts frequency information into wave shapes, to generate ocean surfaces that look physically plausible rather than looping or obviously fake. The simulation runs entirely on the graphics card (GPU) through WebGPU, which is the modern successor to WebGL and gives web pages access to the kind of compute power normally used for video games or scientific simulations. The project is built with Three.js, a popular JavaScript library for 3D graphics in browsers. To get the ocean to look right at multiple scales, the simulation runs three separate wave layers covering different size ranges: large swells, medium waves, and small ripples. Blending these layers together avoids the repeating tile pattern that makes many game oceans look artificial. The wave shapes follow an established oceanography model called JONSWAP, which describes how wind creates waves in deep water and how those waves spread in different directions. The simulation also calculates foam by tracking where waves are about to break, a process that uses a math concept called the Jacobian to detect those areas, then lets the foam build up and fade out over time so whitecaps look like they linger before dissolving. Visual details include how light reflects off the water surface (Fresnel reflections), the bright glitter of sunlight, a subtle scatter of light through the water to give it color and depth, and a small-scale noise layer to add texture to areas that would otherwise look smooth and uniform. A built-in control panel lets you adjust wind strength, wave choppiness, foam amount, sun position, and water colors in real time. This requires a WebGPU-capable browser (Chrome or Edge 113 or later, or Safari 18 or later) and does not fall back to older graphics APIs. To run it, install dependencies with npm and start the development server.
A browser-based real-time ocean simulation that uses GPU compute via WebGPU and FFT wave math to render physically plausible, multi-layered waves and foam.
Mainly JavaScript. The stack also includes JavaScript, Three.js, WebGPU.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.