— Tidewater · v1.0 · WebGPU + WebGL2

Three.js water and
ocean rendering.

Cascaded FFT waves, a Preetham sky, underwater rendering, persistent wakes, buoyancy, and thirteen environment presets. WebGPU with a WebGL2 fallback.

— Scope

Surface, sky, seabed.

Tidewater bundles the ocean surface, the sky above it, and the scene below — wired together and tuned per preset.

Buoyant boats sit on the same surface the shader draws. Wakes write into a canvas the ocean samples back for displacement and foam.

— Underwater

Underwater rendering.

Snell's window above the camera, total-internal-reflection past 49°, animated caustics on the sand and every submerged prop, directional Beer–Lambert absorption, screen-space god rays, and marine snow.

02 · Underwater scene · Reef preset Snell window · Beer–Lambert fog · god rays
— Persistent wake

Persistent wake field.

A world-locked 512² canvas the boat writes into every frame. The ocean shader samples it for displacement and foam, so the wake bends the surface and seeds whitecaps along the path. The trail decays over time.

03 · Persistent wake field · Tropical preset 512² canvas · sampled in vertex + fragment
Hurricane preset · night FFT 256 / 64 / 16 m · Phillips spectrum
— Wave simulation

Cascaded FFT wave simulation.

Three IFFT cascades cover the spectrum from 16 m wind chop to 256 m open-ocean swell. The GPU runs the butterflies in TSL fragment passes; a CPU mirror evolves the same h₀(k) so the boat's keel rests on the surface you see.

Tessendorf evolution, Phillips spectrum, finite-difference Jacobian foam channel. Coefficients tuned per preset.

Cascades
256 m · 64 m · 16 m
Grid
64² per cascade · N=64 butterflies
Buoyancy
CPU h₀ mirror · zero readback
Foam
Cascaded Jacobian · breaks where it should
— Time of day

Time of day.

A 0–24 h slider drives sun elevation and azimuth, repaints the Preetham sky, rebakes the IBL, rebalances fog, swings the god-ray direction, and re-tints the water. Every preset holds its character at every hour.

04 · Time of day · Offshore preset One 0–1 dial · sun · sky · fog · IBL
— Interactive ripples

Interactive ripples.

A Müller height-field rides on top of the FFT. Clicks drop a tight ring; the boat's hull stamps impacts as it crosses crests; River mode adds a flow direction so the ripples drift downstream. It runs in the same TSL graph as the cascades.

05 · Müller height-field · Tranquil preset 128² grid · 240 m world span
Rolling deep-ocean swells under a clear blue sky, a sail ship and rocks reflecting on the heave.
Surface · Huge Swell · noon

Surface shading.

Fresnel reflections, dual-lobe sun glint, depth-graded absorption, subsurface scattering through the crests, and a normal-map cascade catching near-field ripple. The Preetham sky bakes to PMREM each frame; the water inherits its colour from the sky.

Arctic sea with low ice floes drifting between dark rocky outcrops, choppy whitecaps under a pale grey sky.
Foam · Arctic · noon

Foam.

Whitecap foam gated on the FFT Jacobian — high values mark a steepening, breaking face. Wake foam stamped from the boat's path. Shoreline foam radiating from rocks and pilings. Presets swap textures and coverage.

Reef cove at noon: teal-blue calm bay framed by a dock on the left and rocky outcrops, with a small buoy bobbing in the centre.
Buoyancy · Reef · noon

Buoyancy.

Pass a hull into new Buoyancy(ocean, mesh, {points}) and it tracks the rendered surface. Multi-point gives pitch and roll — bow lifts on the crest, stern settles in the trough. Single-point handles buoys and debris with one cheap height query.

— Environment presets

Thirteen environment presets.

Each preset carries its own wave parameters, foam textures, sky turbidity, cloud coverage, fog colours, water tint, depth gradient, seabed look, ambient audio, and bundled props — ice floes for Arctic, spray for Hurricane, kelp and coral for Reef.

  1. Reef preset — teal calm bay
    Reef0.5 m chop
  2. Tropical preset — turquoise lagoon
    Tropical1.2 m
  3. Offshore preset — busy blue open ocean
    Offshore2.6 m
  4. Huge swell preset — rolling deep-ocean swells
    Huge Swell16 m
  5. Sunset preset — warm amber sky
    Sunset1.6 m
  6. Tranquil preset — glassy calm at twilight
    Tranquil0.2 m
  7. Moonlit preset — dark night water with boat silhouettes
    Moonlit0.6 m · night
  8. Foggy preset — low visibility horizon
    Foggy0.8 m · low viz
  9. Arctic preset — ice floes among dark outcrops
    Arctic1.4 m · floes
  10. Hurricane preset — storm sea at dusk with spray
    Hurricane9 m · spray
  11. Lake preset — wooded hill ring across freshwater
    Lake0.4 m · shoreline
  12. River preset — boat between two rocky banks with a +Z flow
    River2 m/s flow
  13. Pool preset — tiled walls bounding bright clear water
    Pool60×38 m basin
— Quality & performance

Four quality tiers.

Low, Med, High, Ultra. The runtime picks one based on backend, pixel budget, hardware concurrency, and UA. Each tier sets ocean mesh segments, FFT N and cascade count, max DPR, anisotropy ceiling, reflector resolution, and whether the volumetric cloud branch compiles into the sky shader at all.

Override with ?quality=low|med|high|ultra.

Low
1 cascade · N=32 · DPR 1.0 · clouds off · SSR off
Med
2 cascades · N=64 · DPR 1.25 · clouds light · SSR on
High
3 cascades · N=64 · DPR 1.5 · clouds full · SSR on
Ultra
3 cascades · N=128 · DPR 2.0 · clouds + god rays · SSR on
— Integration

ES modules with an
import map.

Tidewater ships as plain ES modules with an import map — no bundler, no transform step. Use the full library, or drop the <water-canvas> web component into a non-Three.js site for a self-contained ocean. TypeScript declarations included. Public APIs are documented in the handbook.

  • Zero build · CDN-ready import map
  • WebGPU · WebGL2 fallback from the same TSL graph
  • Drop-in <water-canvas> for non-Three.js sites
  • TypeScript declarations + handbook included
// 1. import map — once, in your HTML
<script type="importmap">{
  "imports": {
    "three":        "https://cdn.jsdelivr.net/npm/three@0.184.0/build/three.module.js",
    "three/webgpu": "https://cdn.jsdelivr.net/npm/three@0.184.0/build/three.webgpu.js",
    "three/tsl":    "https://cdn.jsdelivr.net/npm/three@0.184.0/build/three.tsl.js",
    "tidewater/":   "./tidewater/"
  }
}</script>

// 2. instantiate the ocean and start rendering
import { OceanFFT } from "tidewater/OceanFFT.js";
import { SEA_MODES } from "tidewater/SeaModes.js";

const ocean = new OceanFFT(camera, sun);
ocean.applyMode(SEA_MODES.reef);
scene.add(ocean);
— FAQ

Asked before buying.

Are future updates free?

Every v1.x release ships to existing buyers at no charge. A future v2 would be a paid upgrade, but you keep v1 forever.

WebGPU only, or does it work on WebGL?

Both. Tidewater is WebGPU-first: the FFT cascades, post pipeline and TSL graph compile directly to compute and fragment passes. On browsers without WebGPU, the same TSL graph is lowered to WebGL2. The look holds. You lose some compute-shader speed, and a few Ultra-tier features get capped.

What Three.js version do I need?

r184 is the tested minimum. Tidewater is unbundled, so you control the Three.js version via your import map. WebGPU and TSL still shift between Three releases. Pin a version you've verified.

Is it licensed for commercial use?

Yes. The Tidewater License is per-developer. Use it in client projects, games, sites, embedded apps, paid or free. You can't redistribute the source. Read the full terms before purchasing.

Will it run on my device?

Open the live demo on the actual device. Tidewater targets modern desktop and laptop GPUs first. Phones and tablets fall back to the Low and Med tiers, which the demo picks automatically. When the budget runs out, the runtime sheds features instead of crashing: SSR off on Low, one FFT cascade on phones, cloud branch removed from the sky shader at Low.

What's the refund policy?

Once the .zip has been downloaded, all sales are final. Before download, you can request a full refund within 7 days for any reason. Email me.

What's in the download?

A versioned .zip. Inside: the src/ module tree this site is built against, the assets/ bundle (CC0 boat, dock, ship, rock, yacht and trawler GLBs plus normal and foam textures), TypeScript declarations, an example index.html, a copy of the docs, and a manifest.json recording the version. Any version you've previously bought is re-downloadable from your purchase page.

Is it published on npm?

No. Tidewater is sold only through this site. The zero-build CDN setup avoids the npm and bundler hop entirely. If your toolchain expects an npm install, file links inside a local directory work fine.

— Tidewater v1.0

Buy Tidewater v1.0.

  • One-time purchase
  • Lifetime v1.x updates
  • Commercial use OK
  • 7-day refund · pre-download
  • CC0 assets bundled
$75USD Buy Tidewater → secure checkout via Lemon Squeezy

Instant download after purchase. The zip includes the source tree, assets, TypeScript declarations, docs and example page.