Skip to content

Hunter bird: two merged eyes, with lids and blinks inside each eye - #160

Merged
charliehuge merged 1 commit into
mainfrom
hunter-bird-two-eyes
Nov 6, 2026
Merged

charliehuge merged 1 commit into
mainfrom
hunter-bird-two-eyes

Conversation

@ii-impy

@ii-impy ii-impy commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Summary

One centred eye read oddly, so the bird now has two. Their openings merge into one view, like wraparound sunglasses, and meet in a notch at the bridge. The lids moved into the eyes, and blinks are now the lids snapping shut. They replace the screen-wide lids and the sweeping membrane.

 mainImage
   world, notes, reticle, stamp   (skipped where the eyes cover it)
-  drawIris     one circle, centred
-  drawLid ×2   screen-wide almond lids
-  drawMembrane blink: a sheet sweeps across the screen
+  e = eyeAt(p)   the eye on this pixel's side of the centre line
+  drawIris     ellipse 1.25× wide; band, striations, inner rim
+  drawLid ×2   lids inside e, clipped to it; openness × (1 − blink)
+  drawOuterRim over the lids, so the eyes' shape always reads

The two eyes are mirror images. On either side of the centre line, the merged view is exactly that side's own ellipse, so each pixel only needs one eye. That costs no more than the single eye did.

Tunables (common.glsl), picked in the mockup (docs/superpowers/specs/2026-11-05-hunter-bird-two-eyes-mockup.html):

EYE_R / EYE_SEP 150 px / 150 px (mockup px, ÷ 360)
EYE_LENS 1.25
EYE_LOCK_K 0.8: at full lock, radius and separation shrink, so the view narrows to the centre
LID_BOT 0.94

Buffer B is unchanged: blinks fire on the same events as before.

Evidence

  • Before: with the shader changed, test_lids_open_on_target failed: its patch is now in the iris band at the bridge. test_membrane_sweeps_during_blink also failed, because there is no membrane.
    After: make test: 398 passed.
  • test_lids_shut_during_blink (new): mid-blink, a patch inside the right eye is lid hatching. With the lid blink disabled it fails (0 > 5), so it catches a missing blink.
  • Tightened: test_canopy_stays_in_its_band now looks inside the eyes' openings, away from their rims. iris_patch now sits fully inside the locked band. Both used to pass on the eye's own rim ink.
  • Headless renders (drowsy, hunting, near-full lock, smug after a strike, mid-blink) matched the mockup. Not run on the Pi yet.

Merge Danger

Door: two-way

Revert to get the single eye back.

Blast Radius: hunter_bird

Only this Setup's Image pass changes. Visible side effect: the openings are smaller than the old eye, so most of the top canopy and the side leaves now sit behind the socket. If more foliage should show, move the canopy down rather than change the eyes. Pi frame rate is unmeasured. The per-pixel eye work is comparable, and the membrane pass is gone.

🤖 Generated with Claude Code

One centred eye read oddly. The bird now looks through two overlapping
elliptical eyes whose openings merge into one view, like wraparound
sunglasses, meeting in a notch at the bridge.

- Each eye owns its side of the centre line. There, its own ellipse is
  exactly the merged view, so the shader only needs the eye on a
  pixel's side. That costs no more than the single eye did.
- The screen-wide lids are gone. Each eye has its own top and bottom
  lid, clipped to the eye, with its outer rim drawn over them. Mood
  still sets their openness.
- Blinks shut both eyes' lids over BLINK_S, replacing the sweeping
  nictitating membrane. Buffer B is unchanged.
- Lock shrinks the eyes' radius and separation to 0.8x, so the view
  narrows toward the centre. Strike dilation keeps its old ratio.
- Tests: the lid and blink tests sample inside an eye, and the membrane
  test is now test_lids_shut_during_blink. The canopy and iris tests
  were tightened: they passed on the eye's own rim ink and on the edge
  of the locked opening.
- The spec is updated. The tuning mockup is
  docs/superpowers/specs/2026-11-05-hunter-bird-two-eyes-mockup.html.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@charliehuge
charliehuge merged commit 36867b5 into main Nov 6, 2026
1 check passed
@charliehuge
charliehuge deleted the hunter-bird-two-eyes branch November 6, 2026 18:12
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.

2 participants