Individual skill
3d-ultra-realistic-water
Build an ultra-realistic open ocean in Three.js with a deep-water Gerstner spectrum shaded per pixel from analytic derivatives, each wave faded at its own pixel footprint, plus Fresnel sky-cube and planar reflections, subsurface light through the crests, HDR sun glitter, Jacobian lace foam, a Kelvin wake, hull foam, buoyancy queries and aerial perspective into the sky's horizon haze. Use for seas, oceans, sunset or daylight water, sun glitter paths, ship or boat scenes, wakes, coastal flyovers and any 3D scene with a moving camera and a water horizon. Includes the approved water from Pirate Ship Sunset as a reusable module and demo.
agent-skills/3d/3d-ultra-realistic-water/SKILL.md
Source commit 5ea1661a0e05d82b054553daaa6baf6d0233c33c
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Local scripts
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 7,354
- Repository last updated
- Nov 8, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 10,833 bytesagents/openai.yamlasset · 328 bytesassets/ocean.mjsruns · 30,285 bytesdemo/PROMPT.mddoc · 3,774 bytesdemo/build.mjsruns · 5,419 bytesdemo/index.htmlasset · 821,621 bytesdemo/preview.jpgasset · 224,608 bytesdemo/src/ui.cssasset · 5,800 bytesdemo/src/ui.htmlasset · 1,833 bytesdemo/src/ui.jsruns · 3,504 bytesreferences/ocean.mddoc · 6,007 bytes
Read excerpt
# 3D Ultra-Realistic Water
Use this for an open sea seen by a moving camera, with a horizon and a sun. Reach for something else in these cases:
- **Mirror-flat water seen from the waterline with no mesh:** a full-screen analytic water plane is cheaper.
- **Ripples that follow the cursor on a UI surface:** use `shaders-cursor-ripples`.
- **A small pool that reacts to touch:** use a ping-pong height field.
Source: extracted from **Pirate Ship Sunset**, a single-file Three.js r169 scene in which a three-masted ship sails a rolling sea at sunset under an auto-cycling camera. The water had to stay convincing from 2 m above the waves out to a 12 km horizon.
## The mechanism
**Shade the sea per pixel from the analytic derivatives of a deep-water Gerstner sum, and fade each wave out once its wavelength falls below the pixel footprint.** The per-pixel derivatives keep the glitter and foam sharp on a mesh whose triangles are 30 m wide at the horizon. The footprint fade stops the far sea from boiling into moiré.