How noniv/web-ocean works
web-ocean is a browser-based, real-time WebGPU ocean renderer. The user adjusts settings and flies a free camera; each frame combines simulated waves and foam, atmospheric sky and clouds, ocean shading, and HDR post-processing into the displayed scene. The graph separates those domain stages and the shared shader definitions. Main-module imports and shader-module imports are visible in excerpts; several runtime dispatch and data-flow details are not, so those links are omitted rather than inferred.
Main entry points: main.js WebGPU frame runtime · common.js Shared shader definitions · ocean.js Ocean surface shading · sky.js Atmosphere LUTs
Components 14
User interaction
- Controls and settings
js/main.js - Free camera
js/main.js
Ocean simulation
- FFT wave simulation
js/wgsl/sim.js - Foam and whitecaps
js/wgsl/sim.js - Water height probe
js/wgsl/ocean.js
Sky and atmosphere
- Atmosphere LUTs
js/wgsl/sky.js - Cloud layers
js/wgsl/sky.js - Environment cube map
js/wgsl/sky.js
Scene rendering
- WebGPU frame runtime
js/main.js - Shared shader definitions
js/wgsl/common.js - Ocean surface shading
js/wgsl/ocean.js - Sky background pass
js/wgsl/ocean.js - Bloom and tone mapping
js/wgsl/post.js
Other components
- Viewer
Connections 11
- Viewer → Controls and settings: adjusts
README.md - Viewer → Free camera: flies
README.md - WebGPU frame runtime → Shared shader definitions: imports
js/main.js - WebGPU frame runtime → FFT wave simulation: imports
js/main.js - WebGPU frame runtime → Atmosphere LUTs: imports
js/main.js - WebGPU frame runtime → Ocean surface shading: imports
js/main.js - WebGPU frame runtime → Bloom and tone mapping: imports
js/main.js - FFT wave simulation → Shared shader definitions: imports
js/wgsl/sim.js - Atmosphere LUTs → Shared shader definitions: imports
js/wgsl/sky.js - Ocean surface shading → Shared shader definitions: imports
js/wgsl/ocean.js - Ocean surface shading → Atmosphere LUTs: imports
js/wgsl/ocean.js