Realistic water for Three.js games, visuals and apps

Tidewater adds an ocean to a scene you already have. FFT waves, foam, wakes, surf, buoyancy and an underwater view, on WebGPU with a WebGL2 fallback.

Sunset preset, the Tidewater launchRendered frame by frame on WebGPU at 1920 × 1080

Setup one call, in the scene you already have

createWater() adds the sea to your renderer and scene. Your camera, models and render loop stay as they are. Attach a mesh and it floats.

main.jsindex.html
import { createRenderer } from 'tidewater/renderer.js';
import { createWater } from 'tidewater/Tidewater.js';

const { renderer } = await createRenderer();
const water = await createWater({
  scene, camera, renderer, mode: 'tranquil',
});

// Mass and displaced volume decide how each one sits.
for (const duck of ducks) {
  scene.add(duck);
  water.buoyancy.attach(duck, {
    kind: 'dynamic', hydrostatic: true,
    mass: 120, volume: 0.6,
  });
}

renderer.setAnimationLoop(() => {
  water.update(1 / 60);
  renderer.render(scene, camera);
});
Rendered offline, one frame at a time Read the setup guide

Features what the library does, with footage of each

Open an item to see it running.

Waves flat calm to a 16 m swell

Long swell and wind chop share one surface and travel downwind. Foam appears where a crest folds over, then drifts and fades.

Four cascades on tiles of 1021, 251, 61 and 15 m, sized so the sea doesn't repeat. Buoyancy reads a CPU copy of the same waves, so nothing waits on the GPU.

A hull writes its wake into a field fixed to the world, so the trail stays where the boat left it. It bends the surface, makes foam and fades at a rate the preset sets.

Give it a depth map and the swell slows and steepens over the shallows, then breaks when a wave is taller than 0.78 of the depth. The sand stays wet where the swash ran.

One number moves the sun, sky, fog, reflections and water colour through 24 hours. At night, point and spot lights reflect as broken columns on the chop.

Huge Swell preset. The launch is holding its bow into the swellTry it live

Boats and floating things buoyancy, wakes and splashes

Attach a mesh and it floats. Boats also get a hull mask that keeps the sea out of the cockpit.

Give a body a mass and a volume and it settles to its own waterline. Drop it and it throws spray and sends out rings.

addBoat(gltf.scene) measures the model and sits the keel at its draft. The hull is lifted column by column by the water under it, so it pitches into a crest and slams coming off one. Wake, spray and the hull mask are set up for you.

The camera can go under and come back up. Fog, light and sound switch at the surface, water runs off the lens, and looking up you see Snell's window.

Ducks dropped onto calm waterDrive the launch

Frame breakdown one Offshore frame, six debug views

ocean.setDebugView(n) draws one term of the water shader by itself. It helps when a look is off and you want to know which part is doing it.

The launch under way at noon. The other five views are this same frame.

All four cascades, added per pixel. A cascade fades out once a pixel is bigger than its waves, which is why the distance doesn't shimmer.

Waves too small for a pixel to show become roughness. Far water gets a wide soft glint and a blurred sky.

Whitecaps where the surface folds, and the wake where the hull cut it. Foam lives in its own field, so it drifts and fades after the wave has gone.

The live sky, mirrored per facet and blurred by that pixel's roughness. It follows the time of day.

How much of each pixel is mirror. Look straight down and you see into the water; at a glancing angle it's nearly all sky.

The launch under way on a blue open sea, a faint wake behind it
The same frame coloured by surface normal, sharp near the camera and smooth toward the horizon
The same frame in greyscale roughness, dark and glossy up close and brightening with distance
The same frame showing only foam coverage: the curved wake and scattered whitecaps
The same frame showing only the sky reflected in the water
The same frame in greyscale Fresnel reflectance, dark near the camera and bright toward the horizon
View 0, the finished frame. Offshore preset, Ultra tierAll debug views

In your project plain ES modules, no build step

There's no npm package and nothing to bundle. Copy the folder in and point an import map at it. Types, a React Three Fiber wrapper and the handbook are in the zip.

Tidewater picks a tier for the device and then scales resolution to hold the frame rate. It drops pixels before it drops features.

Clients that share a seed and a tick compute the same sea, so no wave data goes over the network. Two clients, live.

One import map and one module script. r184 is the oldest Three.js it's tested on, so pin a version you've checked.

<Tidewater> and <Ocean> components, plus hooks for reading wave height.

TierFFT cascadesPixel ratioSkyReflections
Low3 × 64²≤ 0.6No cloudsPlanar
Med3 × 128²≤ 0.85CloudsScreen space
High4 × 256²≤ 1.0Clouds, god raysScreen space
Ultra4 × 256², denser mesh≤ 1.5Clouds, god raysScreen space
Two independent Tidewater clients side by side rendering the identical sea state
<script type="importmap">
{
  "imports": {
    "three":        ".../three@0.184.0/build/three.module.js",
    "three/webgpu": ".../three@0.184.0/build/three.webgpu.js",
    "three/tsl":    ".../three@0.184.0/build/three.tsl.js",
    "tidewater/":   "./tidewater/"
  }
}
</script>

<script type="module" src="./main.js"></script>
import { Canvas } from '@react-three/fiber';
import { Tidewater, Ocean, createTidewaterRenderer } from 'tidewater/r3f';

export default function App() {
  return (
    <Canvas gl={createTidewaterRenderer}>
      <Tidewater mode="sunset" time={0.74}>
        <Ocean />
        <Crate x={4} z={6} />
      </Tidewater>
    </Canvas>
  );
}
Chosen per device. Override with ?quality=Open the docs

Presets fourteen, including a lake, a river and a pool

A preset sets the waves, sky, foam, fog and seabed together. Pick one to see it.

What you get one zip, and every 1.x update

  • Source

    The whole src/ tree, unminified. It's the same code this site runs.

  • Models

    The launch, buoy and jetty, with the Blender files they were made in.

  • Types

    TypeScript declarations for createWater, the WaterSystem API and every public class.

  • React Three Fiber

    Components and hooks that load from an import map.

  • Docs

    A handbook, a wave-tuning guide, a glossary and example pages you can run.

  • Presets

    All fourteen, and exportPreset() to save a look you tuned as JSON.

New in 1.5: the sea no longer repeats, storms get an overcast sky, hulls pitch and slam Changelog Examples

FAQ licence, devices and updates

Are updates free?

Every 1.x release is free for existing buyers. If there's ever a 2.0 it'll be a paid upgrade, and you keep 1.x.

Does it need WebGPU?

No. It uses WebGPU where the browser has it and WebGL2 where it doesn't, and it looks the same on both. WebGL2 is slower at the wave simulation and caps a few Ultra features.

Can players share the same waves?

Yes. In deterministic mode, clients with the same seed and tick compute the same surface. NetClock keeps a client that joins late in step with the host. Two clients, live.

Which Three.js version?

r184 or newer. Tidewater isn't bundled, so your import map picks the version. WebGPU and TSL still change between releases, so pin one you've tested.

Can I use it commercially?

Yes. The Tidewater License is per developer and covers client work, games, sites and apps, paid or free. You can't redistribute the source.

Will it run on my device?

Open the live demo on it and see. Tidewater is built for desktop and laptop GPUs. Phones and tablets get the Low and Med tiers, which turn off screen-space reflections and clouds and use a smaller wave grid.

What's the refund policy?

A full refund within 7 days if you haven't downloaded the zip. Once you've downloaded it, the sale is final.

Is it on npm?

No. It's sold here as a versioned zip. If your tooling wants a package, add it as a local file dependency.