Skip to content

Add the sunbeam motes to the golden_line example - #350

Merged
ASDAlexander77 merged 1 commit into
mainfrom
golden-line-motes
Dec 5, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
golden-line-motes

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Ports golden-line's src/effects/motes.js (MIT): the dust hanging in the sunbeams of the camera coach.

  • core/golden_line_motes.ts: 2200 motes from mulberry32(99) exactly as the original, the sun and camera in the coach's own frame, the chair-back shield (aimShield) and visibility (window seat, sun up, out of tunnels).
  • shaders/golden_line_motes.hlsl: drift, the window-opening beam test, pixel-size floor with coverage dimming, forward scatter, wink, near/far fades, chair-back shield; one instanced additive draw after the steam, depth tested, not written.
  • TrainRenderer.vehicleMatrix() and an exported TRN_CAMERA_COACH.

Verification

  • Window-seat shots (both framings, normal and 20x boost) against the page at the same film clock, on/off differences taken within one prepared shot: the specks land on the same pixels and the energy agrees within 2%.
  • gc, own and rc renders byte-identical; own builds without fallback.
  • Vulkan -debug clean; the DX12/VK difference contains no motes.
  • ctest -R golden_line: 6/6 passed.

🤖 Generated with Claude Code

Ports golden-line's effects/motes.js: 2200 specks of dust in the camera
coach, lit only where a shaft of sun reaches them through a window
opening, drifting, winking, brighter toward the light and kept faint
against the chair back facing the lens. One instanced additive draw
after the steam, seen from the window seat only.

TrainRenderer gains vehicleMatrix() and exports TRN_CAMERA_COACH.

Checked against the page with the same film clock: the specks land on
the same pixels and their energy agrees within 2%. gc, own and rc
render byte-identical; Vulkan -debug is clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit 7b5ca3a into main Dec 5, 2026
2 checks passed
@ASDAlexander77
ASDAlexander77 deleted the golden-line-motes branch December 5, 2026 00:40
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