Back to Chesapeake Marine How it's made · Site 21

The tidewater ocean.

A real-time Gerstner-wave sea, rendered in Three.js — sun glint on every crest, foam where the water breaks, horizon fog, and a lone boat riding the swell. Here's exactly how the signature moment is built, so you can build your own.

01Concept & art direction

Brass and teak, meeting the water

Chesapeake Marine is a working boatyard on Virginia's lower bay. The brief was coastal luxury — nautical but never kitsch, the feel of varnished teak, polished brass, and a horizon that breathes. Everything hangs on one idea: a calm, undulating ocean caught at golden hour, with a warm sun path glittering toward the viewer.

The palette is disciplined — a near-black tidewater ground, a soft ivory ink, and two accents: brass gold for the sun and highlights, and a muted teal for structure and kickers. Type pairs Spectral (a high-contrast serif with a true italic) for display against Archivo for the workmanlike body copy.

#07171C · ground #EAF4F4 · ink #0D242B · surface #C69A4C · brass #3E8E9C · teal
02The signature technique

Gerstner waves, from the vertex up

A flat plane (600×600 units, ~256 subdivisions) is displaced in a custom vertex shader by summing several Gerstner waves. Unlike a simple sine height-field, a Gerstner wave moves each vertex in a small circular orbit — points bunch toward the crests and stretch through the troughs, giving the sharp peaks and rounded valleys that read as real water.

Each wave carries a direction, a steepness, a wavelength and a phase speed. We layer five: a couple of long, slow swells for the big shape, then progressively shorter, faster ripples for detail. Crucially, the shader also accumulates the analytic tangent and bitangent as it displaces, so the surface normal is exact — no finite-difference guessing — which is what makes the lighting crisp.

// one Gerstner wave — displaces P and builds the normal
vec3 gerstner(vec2 D, float steep, float wlen, float speed, vec3 p,
              inout vec3 tang, inout vec3 bitang){
  D = normalize(D);
  float k = 6.28318 / wlen;          // wave number
  float c = sqrt(9.8 / k);           // deep-water phase speed
  float a = steep / k;               // amplitude from steepness
  float f = k*dot(D, p.xz) - c*speed*u_time;
  // circular orbit: horizontal pinch + vertical lift
  vec3 d = vec3(D.x*a*cos(f), a*sin(f), D.y*a*cos(f));
  tang   += vec3(-D.x*D.x*steep*sin(f), D.x*steep*cos(f), ...);
  bitang += vec3(...);               // analytic derivatives
  return d;
}
// normal is just the cross product of the accumulated basis
vec3 nrm = normalize(cross(bitang, tang));
03Light on the water

Sun glint, foam & horizon haze

The fragment shader turns geometry into a sea. A reflected-sun column — reflect(-viewDir, normal) dotted with the sun direction — paints the broad glittering path toward the low sun, while a tight per-facet specular adds the sharp sparkle on individual crests. Both are tinted with the brass accent, so the light itself carries the brand.

Water colour blends from a deep teal to a lighter shallow tone by how much each facet faces the sky, with a Fresnel term lifting the grazing angles toward a sky reflection. Foam is a smoothstep on the accumulated crest height, mixed toward ivory only at the very tops. Finally a hand-rolled exponential fog dissolves the far water into a hazy horizon band — the "breathing" horizon the brief asked for. A low-poly boat silhouette rides the swell in the distance, bobbing on a sine.

Depth

Camera & parallax

A high, pulled-back camera reads the plane as a receding sea. It rises on scroll and drifts a touch with the pointer for buoyant parallax.

Calm

Motion with meaning

Waves roll, the glint shifts, the boat bobs — slow and coastal. GSAP ScrollTrigger stages the reveals; easing is expressive, never linear.

04Tools & safety

What's under the hull

Three.js (r160) for the WebGL scene and the custom ShaderMaterial; GSAP + ScrollTrigger for the loader, the headline mask-reveal, staggered section entrances and the magnetic buttons. Fonts are Google Fonts (Spectral + Archivo). No build step — the whole site is one self-contained file.

It's engineered to behave: the render loop pauses when the tab is hidden or the hero scrolls off (IntersectionObserver), the pixel ratio is capped at 2, the canvas sizes from a clamped viewport, and WebGL creation is wrapped so a failure degrades to a painted CSS fallback rather than a blank screen. With prefers-reduced-motion, the loop is skipped entirely and one still, beautiful frame is drawn.

05Takeaways

Reuse this on your own build

  • Sum Gerstner waves, not sines. The horizontal pinch is what separates believable water from a wobbling bedsheet — and it's only a few extra terms.
  • Build normals analytically. Accumulate tangent/bitangent inside the wave function; a cross product gives you an exact normal and razor-sharp specular for free.
  • Let the light carry the brand. Tinting the sun glint and specular with your accent colour ties a physical effect straight back to the identity.
  • Fog is atmosphere. A cheap exponential fog toward a warm horizon colour does more for "depth" than any extra geometry.
  • Never leak a loop. Pause on document.hidden and off-screen, cap DPR, wrap context creation, and honour reduced-motion. Craft is also in what you don't render.