WebGL & shaders
Shader Water Generator is a live Three.js editor for shaping an animated GLSL ocean surface. Start with the height, direction, frequency, and speed of the large waves, then add smaller procedural noise to break up the mesh. Depth color, surface color, opacity, shininess, Fresnel response, and contrast control the final material. The current setup exports as a standalone HTML scene.
What it does
Set the large-wave elevation, speed, and X and Z frequencies while watching the plane update.
Use noise elevation, frequency, and speed to break up the repeating pattern of the larger waves.
Choose depth and surface colors, then refine opacity, shininess, Fresnel power, offset, and contrast.
Download water-shader.html with the current uniform values, GLSL stages, Three.js scene, camera, and orbit controls.
The vertex shader starts with a densely subdivided plane and moves its vertices. Two multiplied sine waves create the broad directional motion. Four octaves of three-dimensional coherent noise subtract smaller, less regular details. By sampling nearby displaced positions, the shader can approximate a surface normal. In the fragment stage, elevation mixes the depth and surface colors. That reconstructed normal, together with the fixed light and camera direction, produces a Blinn-style highlight and a Fresnel edge response. Three.js handles the camera, matrices, clock, renderer, and orbit controls. Editing a value updates the shader uniforms without rebuilding the scene.
It downloads one HTML file containing the configured GLSL shaders, uniform values, Three.js scene setup, camera, orbit controls, and animation loop.
Not without a small change. The generated HTML loads Three.js and OrbitControls from external CDNs, so it needs network access unless you replace those script references with local files.
No. The current export path produces an interactive HTML scene only.
The vertex shader layers four iterations of coherent three-dimensional noise over the large sine-wave displacement, reducing each iteration's contribution.