Skip to content

Reflect the scene in the beach sea, prehistoric lake and tundra ice - #6

Merged
vaprdev merged 4 commits into
mainfrom
water
Oct 10, 2026
Merged

vaprdev merged 4 commits into
mainfrom
water

Conversation

@vaprdev

@vaprdev vaprdev commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Summary

Water was painted as flat color with highlights, so it didn't read as water. A new reflect() in src/water.ts mirrors the scene into water rows with drifting ripples, a tint and a per-pixel weight.

+src/water.ts  reflect(hdr, W, H, y0, y1, rows, amp, weight, tint, time, still?)
 beach         sky, boat and birds mirrored in the sea each frame
 prehistoric   volcano and sky mirrored in the lake each frame
 tundra        still reflection in the ice, once in layout()

Anything drawn in front of the water after it was painted stays in front of its reflection. Also slows the beach's crest highlights to keep flicker down and keeps its night glints saturated.

Evidence

Before (main) on the left, after on the right.

beach

Lake and ice
lakes

Verification: bun run typecheck passes; CI's check job runs dev/check.ts (errors, frame time, flicker) on this branch.

Merge Danger

Door: two-way

Blast Radius: visuals

Beach, prehistoric and tundra; a per-frame reflection pass over the water rows adds some frame cost.

Merged together with the other visual improvements in #1; this PR's CI screenshot check fails by design because screenshots are regenerated there.

@vaprdev
vaprdev merged commit 3cceaa4 into main Oct 10, 2026
1 of 2 checks passed
@vaprdev
vaprdev deleted the water branch October 10, 2026 16:42
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.

1 participant