---
id: "fft-ocean"
title: "FFT Ocean (Tessendorf)"
aliases: [Tessendorf ocean, statistical ocean waves, inverse FFT ocean]
domain: "volumes"
stage: "volume"
realtime: "realtime"
platforms: [webgl2, webgpu, desktop-gpu, cuda, unity, unreal, houdini, blender]
year_introduced: 2001
inputs: [material-params]
outputs: [heightfield, normals, texture]
style: "photoreal"
dynamic: "dynamic"
cost: "medium"
authority: "Tessendorf"
url: "https://texelatlas.vercel.app/t/fft-ocean/"
sources_verified_at: "2026-11-29"
---
# FFT Ocean (Tessendorf) (Tessendorf)

> Synthesise a tileable, animated ocean surface by evolving a random wave spectrum in the frequency domain and taking an inverse FFT each frame for height, choppy displacement and slopes.

## Reach for it when

- ocean should look like real wind-driven waves
- need tileable animated sea surface for open water
- waves need choppy crests and realistic spectrum
- water repeats too obviously with a few sine waves
- control wave look by wind speed and direction

## How it works

Draw a random complex amplitude for every wave vector k on an N by N grid, scaled by the square root of a directional wave spectrum (Phillips, or JONSWAP with a spreading function). Each frame, advance the phase of each amplitude by the deep-water dispersion relation, omega = sqrt(g |k|), keeping the conjugate-symmetric partner so the result is real. Inverse FFTs then produce the height field, the horizontal displacement (multiplying by i k / |k| for choppiness), and the x and z slopes (multiplying by i k). The displaced grid is rendered as a heightfield mesh or vertex-texture-fetch plane, with the slopes giving normals, and a Jacobian of the displacement indicating where waves fold and foam appears. Multiple cascades with different tile sizes are blended to avoid visible tiling at near and far distances.

## When to use it

Choose it for open-sea scenes with realistic wind-driven wave statistics, where the surface must tile, animate indefinitely and respond to wind speed and direction in real time.

Prefer [Gerstner (Trochoidal) Waves](https://texelatlas.vercel.app/t/gerstner-waves.md) when you need a few controllable, analytic waves for stylised water or cheap mobile hardware, and when gameplay needs the exact surface height in a gameplay script. Prefer [Shallow Water Equations (Height-field Water)](https://texelatlas.vercel.app/t/shallow-water-equations.md) for interactive ripples and wakes near shores. Use [JONSWAP Wave Spectrum](https://texelatlas.vercel.app/t/jonswap-spectrum.md) as the input spectrum for fully developed seas.

## Cost

medium — Several N by N inverse FFTs per frame per cascade (N = 256 to 512 is common); cost is dominated by FFT compute passes.
Measured GPU Weight: 35.28× baseline (heavy) — 1.1608 ms median / 1.215 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 27.32× baseline (heavy) — 0.4344 ms median (2.67× faster on L4).
Ampere A100 scaling: 21.51× baseline (heavy) — 0.6194 ms median (1.87× faster on A100).

## Failure modes

- Visible repetition of the tile at distance when only one cascade is used
- Aliasing or shimmering of high-frequency normals at distance without normal mip filtering or roughness adjustment
- Choppy displacement self-intersections (loops) if the choppiness scale is too large
- Waves cannot interact with boats, shores or obstacles because the model is purely statistical
- Aliasing in the spectrum when the grid size and tile length make high k exceed Nyquist for the chosen wavelengths

## Engine support

- blender: builtin — `Add Modifier > Physics > Ocean` (evidence: https://docs.blender.org/manual/en/5.2/modeling/modifiers/physics/ocean.html, checked 2026-12-01) — Port of the Houdini Ocean Toolkit (spectral FFT ocean).
- unity: builtin — `GameObject > Water > Ocean, Sea or Lake (HDRP Water System)` (evidence: https://github.com/Unity-Technologies/Graphics/blob/557f6ac22b948284f57ffae6a789751fd1f63620/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/Shaders/FourierTransform.compute, checked 2026-12-01) — HDRP only; FFT-based spectrum simulation (Phillips).
- unreal: official — `Water plugin (WaterBodyOcean wave spectrum & Gerstner/FFT ocean system)` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/water-system-in-unreal-engine, checked 2026-12-01)

## Dataflow

- Inputs: material-params
- Outputs: heightfield, normals, texture
- Platforms: webgl2, webgpu, desktop-gpu, cuda, unity, unreal, houdini, blender

## Presets

### Tessendorf spectral ocean — Phillips dispersion wave sum with choppy crests and foam (glsl-fragment; rendered 2026-11-30)

```json
{
  "WIND_SPEED": 1.35,
  "CHOPPINESS": 1.15,
  "FOAM_BIAS": 0.58,
  "WATER_CLARITY": 0.65
}
```

```glsl
const float WIND_SPEED = 1.35; // P
const float CHOPPINESS = 1.15; // P
const float FOAM_BIAS = 0.58; // P
const float WATER_CLARITY = 0.65; // P

// Multi-band Phillips-spectrum directional wave synthesis with deep-water dispersion
vec3 evalWave(vec2 p, float t, float wind, float chop, out float jacobian) {
  vec2 windDir = normalize(vec2(0.82, 0.57));
  float L = max(wind * wind * 0.45, 0.08);
  float h = 0.0;
  vec2 slope = vec2(0.0);
  float fold = 0.0;
  float freq = 0.42;
  for (int i = 0; i < 14; i++) {
    float fi = float(i);
    float ang = fi * 2.39996 + 0.35 * sin(fi * 1.7);
    vec2 kDir = vec2(cos(ang), sin(ang));
    float align = abs(dot(kDir, windDir));
    float k = freq;
    float kL = max(k * L, 0.25);
    float phillips = exp(-1.0 / (kL * kL)) / (k * k * k) * (0.28 + 0.72 * align * align);
    float amp = sqrt(phillips) * 0.14 * max(wind, 0.2);
    float omega = sqrt(9.81 * k);
    float ph = dot(kDir * k, p) - omega * t + fi * 1.91;
    float s = sin(ph), c = cos(ph);
    h += amp * s;
    slope += kDir * (amp * k * c);
    fold += chop * amp * k * s;
    freq *= 1.24;
  }
  jacobian = 1.0 - fold;
  return vec3(slope.x, h, slope.y);
}

vec3 skyColor(vec3 d, vec3 sunDir) {
  float y = max(d.y, 0.0);
  vec3 zenith = vec3(0.11, 0.26, 0.52);
  vec3 horiz = vec3(0.82, 0.64, 0.48);
  vec3 col = mix(horiz, zenith, pow(y, 0.52));
  float sun = max(dot(d, sunDir), 0.0);
  col += vec3(1.0, 0.72, 0.42) * pow(sun, 12.0) * 0.65;
  col += vec3(1.0, 0.92, 0.78) * pow(sun, 220.0) * 4.5;
  return col;
}

vec3 aces(vec3 x) {
  x = max(x, 0.0);
  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
  float yaw = 0.0;
  if (iMouse.z > 0.5 || length(iMouse.xy) > 1.0) yaw = (iMouse.x / iResolution.x - 0.5) * 1.4;
  vec3 ro = vec3(0.0, 2.35, 0.0);
  vec3 rd = normalize(vec3(uv.x, uv.y - 0.16, -1.25));
  float cy = cos(yaw), sy = sin(yaw);
  rd.xz = mat2(cy, -sy, sy, cy) * rd.xz;

  vec3 sunDir = normalize(vec3(0.38, 0.24, -0.89));
  float wind = max(WIND_SPEED, 0.15);
  float chop = max(CHOPPINESS, 0.0);

  if (rd.y > 0.02) {
    vec3 col = skyColor(rd, sunDir);
    fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
    return;
  }

  float t = 0.6, tMax = 65.0;
  float prevD = 1.0, prevT = t;
  bool hit = false;
  float jac = 1.0;
  vec3 wv = vec3(0.0);
  for (int i = 0; i < 48; i++) {
    vec3 p = ro + rd * t;
    wv = evalWave(p.xz, iTime, wind, chop, jac);
    float d = p.y - wv.y;
    if (d < 0.0) {
      float a = prevT, b = t;
      for (int k = 0; k < 4; k++) {
        float m = 0.5 * (a + b);
        vec3 pm = ro + rd * m;
        wv = evalWave(pm.xz, iTime, wind, chop, jac);
        if (pm.y - wv.y < 0.0) b = m; else a = m;
      }
      t = 0.5 * (a + b);
      hit = true;
      break;
    }
    prevD = d; prevT = t;
    t += max(0.18, d * 0.55 + t * 0.045);
    if (t > tMax) break;
  }

  vec3 col = skyColor(rd, sunDir);
  if (hit) {
    vec3 p = ro + rd * t;
    wv = evalWave(p.xz, iTime, wind, chop, jac);
    vec3 n = normalize(vec3(-wv.x, 1.0, -wv.z));
    float ndv = max(dot(n, -rd), 0.001);
    float fres = 0.02 + 0.98 * pow(1.0 - ndv, 5.0);
    vec3 refl = reflect(rd, n);
    refl.y = max(refl.y, 0.01);
    vec3 env = skyColor(normalize(refl), sunDir);

    // Subsurface scatter through sunlit wave crests
    float sss = pow(max(dot(rd, sunDir), 0.0), 3.0) * smoothstep(-0.2, 0.65, wv.y) * max(WATER_CLARITY, 0.0);
    vec3 deepCol = vec3(0.012, 0.065, 0.11);
    vec3 scatterCol = vec3(0.04, 0.38, 0.36) * (0.28 + 1.35 * sss);
    vec3 water = mix(deepCol + scatterCol, env, fres);

    // Crisp sun specular sparkle
    vec3 h = normalize(sunDir - rd);
    float spec = pow(max(dot(n, h), 0.0), 180.0) * 3.8;
    water += vec3(1.0, 0.88, 0.68) * spec;

    // Jacobian crest folding -> whitecap foam
    float foamMask = smoothstep(FOAM_BIAS, FOAM_BIAS - 0.38, jac) * smoothstep(-0.05, 0.38, wv.y);
    float fTex = 0.5 + 0.5 * sin(p.x * 9.0 + sin(p.z * 7.0)) * cos(p.z * 8.0 - p.x * 5.0);
    float foam = clamp(foamMask * (0.55 + 0.65 * fTex), 0.0, 1.0);
    water = mix(water, vec3(0.88, 0.92, 0.95) * (0.55 + 0.45 * max(dot(n, sunDir), 0.0)), foam * 0.88);

    float fog = 1.0 - exp(-0.018 * t);
    col = mix(water, skyColor(normalize(vec3(rd.x, 0.015, rd.z)), sunDir), fog);
  }
  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}
```

Attribution: MIT — written for this index

## Lineage

- extends [JONSWAP Wave Spectrum](https://texelatlas.vercel.app/t/jonswap-spectrum.md)

## Combines with

- [JONSWAP Wave Spectrum](https://texelatlas.vercel.app/t/jonswap-spectrum.md): Provides the directional amplitude spectrum that scales the random amplitudes before the FFT.
- [Real-time Water Caustics](https://texelatlas.vercel.app/t/water-caustics-realtime.md): Slope and height maps from the FFT drive the refraction that creates caustic patterns on the seabed.

## Combination ideas

- [Bathymetry-refracted coastal ocean with shore caustics](https://texelatlas.vercel.app/ideas/eikonal-refracted-fft-shore-caustics/)
- [Sun glitter from horizon to bow](https://texelatlas.vercel.app/ideas/sun-glitter-ocean/)

## Sources

1. [primary] Jerry Tessendorf Simulating Ocean Water. SIGGRAPH Course Notes 2001/2004. https://jtessen.people.clemson.edu/reports/papers_files/coursenotes2004.pdf (verified via http on 2026-11-29)
2. [primary] Christopher J. Horvath (2015) Empirical directional wave spectra for computer graphics. Proceedings of the 2015 Symposium on Digital Production. https://doi.org/10.1145/2791261.2791267 (verified via crossref on 2026-11-29)
3. [implementation] gasgiant (2020) gasgiant/FFT-Ocean. https://github.com/gasgiant/FFT-Ocean License: MIT. (verified via github on 2026-11-29)
4. [implementation] jbouny (2013) jbouny/ocean. https://github.com/jbouny/ocean License: MIT. (verified via github on 2026-11-29)

## Cite this entry

Texel. "FFT Ocean (Tessendorf)." https://texelatlas.vercel.app/t/fft-ocean/ (accessed 2026-12-01).
