← The Lab

06 / Three.js · Shaders

Raging Sea

Raging Sea — animated cyan wave surface displaced by shaders on a black background

Lab notes

This experiment turns a subdivided plane into animated water. Large waves and small ripples are driven in the vertex shader; color follows height in the fragment shader so peaks and troughs read clearly.

Techniques

Vertex displacement with layered sine waves and Perlin noise. Height passed to the fragment stage for depth-to-surface color mixing. Live uniforms for elevation, frequency, speed, and palette.

Stack

Three.js, custom GLSL, vite-plugin-glsl, lil-gui, OrbitControls, Vite. Static WebGL demo on GitHub Pages.