All recipes

R29 · Grid Studio · free Instagram tools in the browser

Raymarched liquid shader

A film for a grid maker drawn by one fragment shader: a chrome drop falls into a pool with a photo inside it, seams snap on the beat into nine liquid tiles, the tiles fall into a profile and melt back into one picture, the liquid turns into each tool, and it gathers into the logo at the official file's size.

32.0s · 1920×1080 · 30fps

A second film for Grid Studio, twelve free Instagram tools that run in the browser, and the first of season three: everything in the picture is one raymarched shader. A chrome drop falls into a pool and the coastline photo surfaces inside the liquid; seams draw across it and snap on the beat into nine tiles; the tiles fall into a profile in posting order and melt back into one picture; the liquid becomes a carousel, round covers, a palette and a resize; an upload tries to pull a drop out of the browser and it springs back; and the liquid gathers into the mark.

An original score composed in code at 112 bpm, from E minor to G major: a pitched glide and a low bloom as the drop falls into the pool, a rising stretch and a glassy pluck for every seam that snaps, a wooden tick and a plucked note for every tile in posting order, a filtered sweep on each tool, a rubbery glide and a snap back as the upload fails to pull the drop away, and a warm G major chord and a bell on the mark. No spoken dialogue. On-screen text carries the story.

scene breakdown · select a scene to play

The prompt

The brief I gave Claude Code, with the HyperFrames skills installed, to start this film. Approvals and fixes came after, but this is where it began.

prompt · verbatim
Make a 32-second 1920x1080 film in HyperFrames for Grid Studio, twelve free Instagram tools that run in the
browser ("No upload, no account, no watermark: your images never leave your device."). Everything in the picture is one
WebGL2 fragment shader that raymarches signed distance fields: no meshes, no 3D library. Type is HTML over the canvas.
Grid Studio's palette: ink #181512, paper #faf8f4, line #e2ddd2, muted #6f685e, terracotta #c24d21. Instrument Serif,
Archivo and JetBrains Mono. Use the app's own demo photo of a coastline.
The pour: a chrome drop falls into a pool, rings run out, and the photo surfaces inside the liquid, bent by its normals.
The cut: seams draw across the pool in a 3x3; on the beat each seam stretches into a neck and snaps, until nine liquid
tiles stand apart. Numbers rise in posting order, post 1 bottom-right in terracotta.
Posted: the tiles fall one by one, in posting order, into a profile grid, and the seams melt into one picture again.
The tools: the liquid becomes a carousel that splits into slides, round covers, a palette of five drops coloured from
the photo, a resize from 1:1 to 4:5 to 9:16, a QR code that sets into blocks, and back to the grid.
In your browser: the liquid sits in a browser window; an upload tries to pull a drop out, it stretches to the edge and
springs back. "No upload. No account. No watermark."
Title: the liquid gathers into the 3x3 mark at exactly the official file's size, then the official mark, flat, never
redrawn or recoloured, then the line and the URL. Score: compose it in code from the same table, 112 bpm, E minor to
G major.

Remix it

Swap the parts in braces and paste it in. Some starting points:

  • A photo printing service: a drop of ink fills a tray with a picture, it tears into prints on the beat, and the prints fall into an album.
  • A tile shop: glaze pours into a mould, cracks into tiles along the grout lines, and the tiles set into a wall that reads as one pattern.
  • A puzzle app: a picture pours in as liquid, snaps into pieces, and the pieces flow back into the finished puzzle.
  • A design tool's export panel: one frame as liquid, split into the sizes it exports to, then gathered back into the logo.
prompt · template
Make a {duration}-second {width}x{height} film in HyperFrames for {subject}, as one raymarched fragment shader, in
{palette}. A drop of {the_material} falls into a pool and {the_picture} surfaces inside it; seams draw across it and
snap on the beat into {the_pieces}; the pieces fall into {the_destination} in order and melt back into one; the liquid
becomes {the_features}; {the_threat} tries to pull a drop away and it springs back; and the liquid gathers into the
logo at its official size. Then the flat logo with {line} and {url}. One baked table drives the snaps, the order, the
shapes and a score composed in code.

Ingredients

stack
HyperFramesWebGL2GLSLGSAPPython (table, score)
length
32 s · 1920×1080 · 30 fps, with a 9:16 cut from the same shader
renderer
One WebGL2 fragment shader on a full-screen triangle, up to 110 march steps, soft shadows and ambient occlusion from the distance field, repainted on every seek
liquid
Rounded slabs joined by a smooth minimum: the pool is one slab until a seam's time, then two that drift apart, so the gap between them stretches into a neck before it snaps
picture
The photo is read on the liquid's top faces at their position in the grid and bent by their normals, so it rides the liquid as it splits, falls and melts
studio
A procedural environment with paper-white softboxes, a horizon band and one terracotta strip for reflections, and ACES tone mapping
mark match
The camera sits at the height that makes one unit 93.75 px, so the liquid's 3×3 lands exactly under the flat official mark
timing
The fall, the seams and their snaps, the posting order, the tool shapes, the upload pull and the title in one baked table on a 112 bpm grid
palette
#181512 ink · #faf8f4 paper · #e2ddd2 line · #6f685e muted · #c24d21 terracotta
type
Instrument Serif · Archivo · JetBrains Mono
sound
112 bpm, E minor to G major: a glide and a bloom for the drop, a stretch and a glassy pluck per seam, a tick and a pluck per post, a sweep per tool, a rubbery glide and a snap for the upload

how it's built

  1. 01 · 00:02

    A drop into a pool

    The drop is a sphere that falls and joins the pool through a smooth minimum, so it merges into the surface instead of passing through it; the rings are a decaying wave added to the pool's height.

  2. 02 · 00:03

    The picture surfaces

    The photo fades in on the liquid's top faces, read at each point's place in the grid and pushed by the surface normal, so the last ripples bend it.

  3. 03 · 00:08

    A seam that snaps

    A beat before each seam's time, the slab under it becomes two that start to drift apart; the smooth minimum keeps them joined by a thinning neck until the gap outgrows it, exactly on the beat, and both halves wobble like liquid.

  4. 04 · 00:12

    Posted in order

    The nine tiles lift and fall one by one in posting order, post 1 bottom-right in terracotta, and as the last one lands the tiles close up and a wider smooth minimum melts the seams away.

  5. 05 · 00:19

    The liquid becomes the tools

    Each tool is a shape the same slabs blend into: a strip that splits into slides, round drops for the covers, five drops coloured from the photo, a squash from 1:1 to 4:5 to 9:16, and a field of blocks for the QR code.

  6. 06 · 00:25

    It never leaves

    An upload arrow pulls a drop toward the edge of the browser: the drop stretches into a capsule and springs back on a wobble, and the three "No" lines arrive.

  7. 07 · 00:28

    The mark, matched

    The liquid gathers into nine rounded tiles extruded from the mark's own shape, at exactly the size of the official file, which then takes over, flat.

gotchas

  • Keep the shader in a JavaScript template string, not a script tag with a custom type: the linter parses inline scripts and fails on GLSL.
  • A smooth minimum of boxes that already touch leaves bulges along the seams: keep the slabs as one body until the seam's time instead of blending touching boxes.
  • Give any detailed field, like the QR blocks, a bounding box distance: outside it, return the distance to the box, or the march takes tiny steps everywhere and the frame goes black.
  • Measure the DOM once when the film is built, never inside the paint function: a measurement every frame triggers layout during the render and slows every seek.

source

Take the whole project

MIT for the code, composition and score. The Grid Studio mark and name are not included in the licence. The demo photo is by Stefan Kunze (Unsplash License) and is not in the repo: add your own image.