Skip to content

The Moon Is a Pearl

A moon over a midnight sea; the camera withdraws to show the sea sits inside a giant oyster and the moon is its pearl. Iridescent nacre, ray-traced reflections. Loops.

Background, V1 Effects3DSeamless loop, verified240 lines of codev1.0.0

In Light, glass & shine, Made for phones

Next: Cathedral of a ButterflySurprise me

The Moon Is a Pearl preview
Starting live preview…
00:00:00:00 / 00:00:00:01

Live, running the real source at reduced resolution.

Combine several clips and hand them over together from your sequence.

A finished film

It plays exactly as rendered and has nothing to adjust. The preview runs the same code your AI receives.

Info

What it is

A full moon hangs over a dark sea, with its rippling reflection below. The camera withdraws and light unfurls across mother-of-pearl: the sea is held inside a monumental oyster, hinged and opened to about 76 degrees, and the moon is the pearl resting in it, reflected in the black water. The layered shell halves, the iridescent nacre with its growth rings, the contact shadows and the ray-traced pearl reflection are all computed in the shader, and every animated part completes whole cycles, so the 12 seconds loop exactly. The film has no settings.

Reuse it in your own idea

  • Reveal clip: the pull-back from moon to oyster is a ready-made "it was something else" moment.
  • Seamless loop: it returns to the moon at the end, so it repeats for any length.
  • Calm night background: hold the first seconds as a still moon over the sea.

Which part is reusable

src/moon-pearl.js is the ingredient your AI reuses. demo.js is only the example scene around it, and uses the demo harness only for the demo.

Good to know

  • The film is finished: it has no settings. To change colours or timing, edit the shader.
  • It is composed for a 4:5 portrait frame.
  • Its length is fixed at 12 seconds; repeat the loop to fill a longer clip.

Technical details

Technical details
Implementation
Three.js 0.185.1 (WebGL) · ES module src/moon-pearl.js
Exports
  • createMoonPearl() => { scene, camera, setSize(width, height), update(time), dispose() }
Dependencies (exact)
  • three@0.185.1 (source) — Renderer and a full-screen shader material.
  • apw-runtime@1.0.0 (demo) — Demo harness.
How it fits a scene

Coordinates: Composed for a 4:5 portrait frame and measured by the frame height: in a wider frame the picture stays centred at full height and its background fills the sides; in a narrower one, such as 9:16, the sides are cropped.

Lighting: Moonlit: a bright pearl reflected in rippling water, iridescent nacre and contact shadows.

Timing: Moon and sea first; the camera withdraws and light unfurls across the shell to show the oyster; the view then returns to the moon.

Output
1080×1350, 30 fps, 12 s · procedural (computed from the frame number) · seamless loop — Every part of the film is a function of the time modulo its length, and every motion completes whole cycles, so the last frame meets the first.
Tested
Rendered 360 frames on 2026-10-10 in Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0 (WebGL 2 via SwiftShader (software)). Same frame twice from fresh pages: identical. Loop: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.
Performance
One full-screen fragment shader. About 32 ms a frame at 1080 by 1350 on an integrated Intel GPU (Iris Xe), and about 8 s a frame with software WebGL. Plays at 30 frames a second at full size on an integrated GPU.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- moon-pearl/1.0.0 --out my-video.mp4Needs Node 18+, ffmpeg and Chrome/Chromium. Add --params my-settings.json (from Copy settings) for your own settings.
Version
1.0.0 · sha256:33f4ebf6db0f59d0…
Files
License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder. License details
Provenance
From the owner's collection Twenty Impossible Worlds: the original GLSL ES 3.00 shader of the film “The Moon Is a Pearl”, created with ChatGPT / Codex and used as published, wrapped for AI Pixel Wizard as a three.js full-screen shader in October 2026. The collection's synthesised soundtrack is not part of this ingredient.
BinMore like this

Neon Koi

Background3DSeamless loopPortrait8 seconds