Skip to content

Rainbow poop: a shader Setup where rainbow poop falls on visitors (#161) - #168

Merged
charliehuge merged 5 commits into
mainfrom
claude/rainbow-poop
Nov 8, 2026
Merged

charliehuge merged 5 commits into
mainfrom
claude/rainbow-poop

Conversation

@ii-impy

@ii-impy ii-impy commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #161.

A new shader player Setup, rainbow_poop. About every 5 s, a rainbow poop appears at the top of the sky over each visitor. It drifts down slowly enough to watch and splats on their silhouette. The splats stick to the person, drip, and fade after 20 s. If the visitor turns round after it appears, it misses and lands on the floor at their feet.

Spec: docs/superpowers/specs/2026-11-08-rainbow-poop-design.md. The first build had a flock of birds dive-bombing; the birds were removed on review (see the spec's "Revisions" section).

How it works

  • Buffer B (a small texel grid) holds, per person:

    • a countdown to their next poop
    • an anchor: their silhouette's centre of mass and size, measured from this frame's Body inside the tracker's box. Raised arms, strides and box jitter don't move splats, and they don't lag.
    • their poop while it's falling (one at a time)
    • a ring of 8 splats, stored in the person's own frame so they ride along with them

    It also holds a ring of 8 floor puddles.

  • The fall: the poop starts just above the top of the screen. The drop point is over the person's centre of mass, ahead of them by their velocity × the fall time, and always on screen. It falls at a steady FALL_SPEED (0.2 screen heights/s) with a gentle sway, drifting toward its person at up to HOMING_MAX (0.18 screen heights/s). Standing or fidgeting gets you hit; walking or turning away dodges.

  • Image draws paper and clouds, floor puddles, people (warm-white fill with an ink outline, as in hunter_bird), splats clipped to the silhouette, then falling poops.

  • Sizes: splats are 0.15 × the person's size (about their height) in radius, and puddles 0.1 screen heights.

  • Ages and countdowns advance in 1/32 s steps with golden-ratio rounding, which keeps them exact in 16-bit buffers.

  • Shadertoy: Buffer D is left free for the blob painter.

  • Every tunable is at the top of common.glsl.

Testing

  • test_rainbow_poop.py: 22 headless GL tests using the real BodyBlobs tracker on a fake clock. They cover:
    • the empty room
    • first hit and cadence
    • the fall: starts at the top, takes over a second, one at a time, drawn while falling
    • a fidgeting, person-shaped silhouette (narrow head, legs, an arm in and out) is always hit
    • splats stay put on the body while arms go up and out and the person walks
    • two people both getting hit
    • splats following a walker, fading, keeping time, and fading on loss
    • a reused slot starting clean
    • dodging and the floor puddle
    • clipping to the silhouette
    • bounded state through huge time steps
  • They pass on this machine's Intel GPU and under llvmpipe.
  • Full Python suite: 464 passed. test_hunter_bird.py::test_person_has_white_fill_and_ink_outline fails on this machine on a clean main too, but passes in CI.
  • Frame rate on the show machine (the Intel Ultra 9 mini PC): shader_app.py --mock-camera --windowed --setup rainbow_poop holds the 30 fps cap (30.2 fps; render 640×360).

Not verified

  • How the cadence, fall speed and dodging feel with the real camera and real visitors.
  • Pasting into Shadertoy.

🤖 Generated with Claude Code

ii-impy and others added 3 commits November 8, 2026 12:38
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ick (#161)

- Buffer B keeps the flock (orbit, dive, climb), the poops in flight, a
  bomb countdown and low-passed anchor per person, a ring of splats per
  person in their own frame, and a ring of ground puddles.
- One idle bird per overdue person: first bomb ~1.2-2 s after confirming,
  then every 5 +/- 1 s. The dive leads the target by the fall time, so
  reversing after the drop dodges and the poop splats at their feet.
- Splats are clipped to the silhouette, drip, fade after 20 s, and fade
  over 0.6 s when the track is lost; a new track starts clean.
- Ages and countdowns are stored in 1/32 s steps rounded stochastically,
  since plain f16 adds of 1/30 above 8 s ran ~6% slow.
- Buffer D is left free for the blob painter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The per-texel random dither for tick() left ages wandering ~0.17 s
(1 sigma) over 15 s, so test_ages_keep_time_in_half_floats passed locally
by luck and failed in CI (0.125 s). A Weyl sequence, fract(iFrame * phi)
in integers, keeps the running error within about one AGE_Q.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ii-impy
ii-impy force-pushed the claude/rainbow-poop branch from ff2f6d4 to b4e93a5 Compare November 8, 2026 17:38
…s big

- The flock, dives and climbs are gone. Each person's poop appears just
  above the top of the screen, over where they'll be, and falls at a
  steady 0.2 sh/s with a gentle sway, so it can be watched the whole way.
  One per person in the air at a time; drop points are kept on screen.
- Cadence, leading aim and dodging are unchanged; a miss falls to the
  person's feet and leaves a puddle.
- Splats are twice the radius (SPLAT_R 0.15 x box height) and sit a little
  deeper; puddles double to match, and the falling drop is larger.
- Tests: bird tests replaced with fall tests (starts at the top, takes
  over a second, one at a time, drawn while falling).
- 30.2 fps (the cap) on the show machine with --mock-camera.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ii-impy ii-impy changed the title Rainbow poop: a shader Setup where birds dive-bomb visitors (#161) Rainbow poop: a shader Setup where rainbow poop falls on visitors (#161) Nov 8, 2026
…e box

On site, poops often missed and splats slid around people as they moved.

- Homing: a falling poop drifts toward its person's centre of mass, at up
  to HOMING_MAX (0.18 sh/s). Aim spread is now +/- 0.05 of their size, not
  half the box width. Fidgeting people are always hit (was 81% on a
  person-shaped test silhouette); walking or turning away still dodges.
- Anchor: splats ride on the silhouette's centre of mass and size
  (SIZE_K x sqrt(area)), measured from this frame's Body inside the
  tracker's box, instead of the eased box top-centre and height. Raised
  arms, arms out and strides barely move them (0.055 -> < 0.035 UV in the
  test), and they no longer lag the silhouette.
- Tests: splats stay put with arms up/out while walking; a fidgeting
  person-shaped silhouette is always hit. Both fail on the previous commit.
- Still 30.2 fps (the cap) on the show machine with --mock-camera.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@charliehuge
charliehuge merged commit 1a16712 into main Nov 8, 2026
1 check passed
@charliehuge
charliehuge deleted the claude/rainbow-poop branch November 8, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FundingCAPTCHA Setup: Rainbow Poop — birds dive-bomb silhouettes

2 participants