← Gallery № 26 · webgl

Moonlit Ripple

Moon reflection on dark water with multi-directional waves, Fresnel reflection, and 3D perspective.

What is Moonlit Ripple?

Moonlit Ripple is a water surface in one fragment shader. Several wave trains at different angles are summed, their interference drives the surface normal, and the moon reflection uses a Fresnel term so grazing angles reflect more while steep angles show more of the dark water. A camera tilt parameter lifts the surface into a 3D perspective, so it reads as a plane receding into the distance rather than a flat texture. Ripple speed, moon glow, camera tilt and wave intensity are all live. It requests an alpha-enabled WebGL context, so it can be layered over your own background. DPR is capped at 2 and it honours prefers-reduced-motion.

Moonlit Ripple is a free WebGL web effect in the TappyPrism library. Moon reflection on dark water with multi-directional waves, Fresnel reflection, and 3D perspective. It is rendered on the GPU by a fragment shader, so it costs almost nothing on the CPU and works well as a full-screen background. It ships as a single self-contained HTML file (moonlit-ripple.html) with zero dependencies — no npm package, no framework, no build step. It exposes 4 live parameters — Ripple Speed, Moon Glow, Camera Tilt, Wave Intensity — adjustable in the browser or at runtime.

Parameters

ParameterKeyRangeDefault
Ripple SpeedRIPPLE_SPEED0.1 – 1.50.5
Moon GlowMOON_GLOW0.3 – 21
Camera TiltCAMERA_TILT-0.3 – 10.15
Wave IntensityWAVE_INTENSITY0 – 31

How to add Moonlit Ripple to your page

  1. Download the standalone file moonlit-ripple.html and copy its source into your project.
  2. Or embed it as a background iframe:
    <iframe src="https://prism.tappypotato.com/fx/moonlit-ripple.html" style="position:fixed;inset:0;width:100%;height:100%;border:0;z-index:-1" title="Moonlit Ripple"></iframe>
  3. Tune it at runtime with postMessage:
    iframe.contentWindow.postMessage({ type: 'param', name: 'RIPPLE_SPEED', value: 0.5 }, '*');

Frequently asked questions

What is Moonlit Ripple?

Moonlit Ripple is a water surface in one fragment shader. Several wave trains at different angles are summed, their interference drives the surface normal, and the moon reflection uses a Fresnel term so grazing angles reflect more while steep angles show more of the dark water. A camera tilt parameter lifts the surface into a 3D perspective, so it reads as a plane receding into the distance rather than a flat texture. Ripple speed, moon glow, camera tilt and wave intensity are all live. It requests an alpha-enabled WebGL context, so it can be layered over your own background. DPR is capped at 2 and it honours prefers-reduced-motion. Moonlit Ripple is a free WebGL web effect in the TappyPrism library. Moon reflection on dark water with multi-directional waves, Fresnel reflection, and 3D perspective. It is rendered on the GPU by a fragment shader, so it costs almost nothing on the CPU and works well as a full-screen background. It ships as a single self-contained HTML file (moonlit-ripple.html) with zero dependencies — no npm package, no framework, no build step. It exposes 4 live parameters — Ripple Speed, Moon Glow, Camera Tilt, Wave Intensity — adjustable in the browser or at runtime.

How do I add Moonlit Ripple to my website?

Download the standalone file at https://prism.tappypotato.com/fx/moonlit-ripple.html and copy its source into your page, or embed it as a background iframe: <iframe src="https://prism.tappypotato.com/fx/moonlit-ripple.html" style="position:fixed;inset:0;width:100%;height:100%;border:0;z-index:-1" title="Moonlit Ripple"></iframe>. Tune it live with postMessage, e.g. iframe.contentWindow.postMessage({ type: 'param', name: 'RIPPLE_SPEED', value: 0.5 }, '*').