whatisgithub

What is poseidon?

owenyuwono/poseidon — explained in plain English

Analysis updated 2026-05-18

50JavaScriptAudience · developerComplexity · 4/5Setup · moderate

In one sentence

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.

Mindmap

mindmap
  root((Poseidon))
    Rendering
      Three.js
      WebGPU
      Fresnel Reflections
    Wave Math
      FFT
      JONSWAP Model
      Three Wave Layers
    Effects
      Foam and Whitecaps
      Sun Glitter
      Water Color Depth
    Controls
      Wind Strength
      Choppiness
      Sun Position

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Drop a realistic, GPU-accelerated ocean surface into a Three.js web scene.

USE CASE 2

Study how FFT-based ocean simulation and the JONSWAP wave model work in practice.

USE CASE 3

Experiment with wind, choppiness, foam, and sun position using the built-in control panel.

USE CASE 4

Use as a reference implementation for WebGPU compute shaders in the browser.

What is it built with?

JavaScriptThree.jsWebGPUTSL

How does it compare?

owenyuwono/poseidonbwilky/ha-spotify-browsergangweix/next-forcing
Stars505051
LanguageJavaScriptJavaScriptJavaScript
Setup difficultymoderatemoderatehard
Complexity4/52/55/5
Audiencedevelopergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a WebGPU-capable browser such as Chrome/Edge 113+ or Safari 18+, no fallback to older graphics APIs.

So what is it?

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.

Copy-paste prompts

Prompt 1
Explain how FFT is used to generate realistic ocean wave shapes instead of a looping texture.
Prompt 2
Walk me through how the JONSWAP oceanography model determines wave height and direction from wind speed.
Prompt 3
I want to add foam that builds up near breaking waves using a Jacobian-based detection method. How does that work in this project?
Prompt 4
Show me how WebGPU compute shaders differ from WebGL for running a large-scale simulation like this ocean.
Prompt 5
Help me set up this project with npm and get the development server running so I can see the ocean in my browser.

Frequently asked questions

What is poseidon?

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.

What language is poseidon written in?

Mainly JavaScript. The stack also includes JavaScript, Three.js, WebGPU.

How hard is poseidon to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is poseidon for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.