Zero dependencies · Pure WebGL2

Photorealistic
Ocean Engine

Realistic Gerstner waves, PBR water, underwater fog, caustics and schooling fish. One JavaScript file. No Three.js. No libraries. Just the raw WebGL2 spec.

0 KB
Dependencies
60 FPS
Locked framerate
150
Instanced fish
5
Fish variants
What's inside

Everything in one file

Hand-written GLSL ES 3.0, custom matrix math, custom geometry — no imports, no CDN, no build step.

Gerstner wave stack

Six stacked waves with deep-water dispersion and irrational wavelength ratios so the surface never tiles.

PBR water shading

GGX specular, Schlick Fresnel, Beer-Lambert absorption, subsurface scattering on crests and sky-matched reflections.

Underwater world

Dive below the surface and the whole scene switches: exponential fog, Snell's window, dimmed sky, blue-shifted lighting.

Procedural fish

Parametric body with proper radial profile, five fin sheets, per-eye sphere geometry, and vertex-shader swimming motion.

Seabed with caustics

Analytic dunes, four-octave value noise sand color, and animated caustic light ribbons under the water.

Free camera + swim

Pointer-lock mouse look, WASD movement, Space/Shift vertical. Fly above water or dive below with the same controls.

Download

Get the files

Click any card below to download that file directly. No signup, no tracker, no archive.