跳到正文

Aureliengmz

clearwater

Real-time, photoreal shallow water in a single HTML file. WebGL2, no libraries, no build step.

README 已保存到本站,可直接阅读

Documentation snapshot

README 快照

这篇是英文原文

下面正文是项目自己的英文 README。想读全文就用浏览器自带的整页翻译: Chrome / Edge 点地址栏右侧的翻译图标,或用右键菜单里的「翻译成中文」; 手机浏览器一般在菜单里。

本页保存的是公开项目资料快照,阅读过程不需要连接 GitHub。

Clearwater

Real-time, photoreal shallow water in a single HTML file. WebGL2, no libraries, no build step, no external assets.

Live demo · drag to look around · tap the water

图片:Clearwater

Run

Open index.html in a browser, from disk or any static host. Nothing to install.

Needs WebGL2 with float render targets (EXT_color_buffer_float). Resolution adapts to keep the frame rate up.

URL optionEffect
?debugFrame rate, resolution, quality level
?noglareDisable lens-diffraction glare
?t=5Freeze time at 5 s (screenshots)
?yaw=0.5&pitch=-0.4Initial camera direction, radians
?view=causShow the raw caustics texture

Code map

Everything lives in index.html, in sections marked /* ---- Name ---- */:

SectionWhat to tweak
Ocean spectrum (FFT)L patch size, DEPTH, TARGET_SLOPE wave steepness
Interactive ripplesRN, RSIZE simulation grid
CausticsG ray grid, C caustics resolution, IORS per-channel refraction
Main water shaderFresnel, absorption, seabed shading (GLSL)
Post / Lens diffraction glareBloom, glare, tone curve, grain
Camera & inputSUN_EL, SUN_AZ sun position, VFOV
LoopFrame loop, adaptive quality

The seabed texture is base64 in “ at the end of the file. To regenerate it: python tools/make_pebbles.py (numpy, scipy, pillow), then paste the base64 JPEG into that block.

References

  • Jerry Tessendorf, Simulating Ocean Water: FFT waves
  • Evan Wallace, WebGL Water: refracted-grid caustics
  • Inigo Quilez, Texture repetition: seabed tiling
  • Marc Olano & Dan Baker, LEAN Mapping: distant highlights

Credits

Made by Aurélien at Lumaris.

MIT License, see LICENSE.

Official distribution

获取与安装

暂未发现可确认的官方软件包地址

当前 README 快照没有出现 npm、PyPI、Crates.io、pub.dev 等官方包页链接。本站不会根据仓库名称猜测下载地址。

本站不托管项目文件;需要安装时,请以项目维护者发布的官方文档为准。

使用前核验

本站保存公开资料用于阅读,不代表安全审计或功能背书。安装前请核对许可证、依赖来源和发布签名,不要直接运行来源不明的二进制文件或高权限脚本。