Skip to content

Caustics 0.1.0: the live picture as the floor of a pool under moving water, lit by the net of bright lines its waves focus, as Yuksel and Keyser compute them - #26

Merged
kevinraymond merged 1 commit into
mainfrom
caustics-0.1.0
Oct 29, 2026
Merged

kevinraymond merged 1 commit into
mainfrom
caustics-0.1.0

Conversation

@kevinraymond

Copy link
Copy Markdown
Owner

Caustics makes the picture the floor of a pool under moving water, lit
by the net of bright lines the waves focus (board #4671).

  • The water: a height field at a quarter of the picture's size, the
    damped wave equation stepped once a frame (as Evan Wallace's WebGL
    Water steps it, MIT), with a little viscosity so the grid's
    checkerboard dies first. Ten slow swells from a build-time table lie
    on top, computed every frame from their clock, never played back.
    What moves pushes the water into broad wakes (the change since the
    input's last frame, blurred), and each beat drops a raindrop.
  • The caustics: Yuksel and Keyser's gather (2009) in one compute
    shader. Each 16 x 16 patch of a 640 x 360 floor tallies, in shared
    memory, the fixed one-pixel square every surface sample within 16
    pixels lands on it. All the light is kept at Depth 1 (95% at 2, so
    Depth stops there). Rainbow refracts three colors apart.
  • The floor: the picture seen through the surface (Refraction 0.25 of
    what the depth would bend it), lit by the caustics, absorbed red
    first by the depth, the sun glinting, the red guard on every pixel.
    Input 3 makes the water shallower over what is nearer.
  • Flashing: no setting. Offline, fine ripples flashed 3 to 5 times a
    second; broad swells, wakes blurred over 10 of the water's pixels and
    drops a ninth of the height in radius keep every clip and common
    setting at its clip's own or the half-flash margin, red 0 everywhere,
    the corners 1.5.
  • 2.2 ms GPU (the gather 0.9) and 0.4 ms CPU a frame at 1280 x 720 on
    the M2 Pro; nothing cooks while unused (0 of 234).
  • Patents: clear by design. NVIDIA's US 11,830,125 sizes each hit's
    shape by its ray's spread (here every square is one pixel); NVIDIA's
    US 12,315,070 carries light particles across frames (here nothing is
    carried); ByteDance's US 11,854,121 picks ripple maps from a prepared
    sequence (here the water is simulated) (private/patents/caustics.md).

Also: Showreel 0.1.25 with twenty-five effects (idle 0 of 7303, Cycle
4.2 ms GPU, flash within each setting), the README row, status and hero
(2, seven rows of three, two of two), and BUILDING.md gains Caustics'
flash traps and the shared-memory tally pattern.

…water, lit by the net of bright lines its waves focus, as Yuksel and Keyser compute them

The water is a wave equation under slow swells, pushed into broad wakes
by what moves and by a raindrop on each beat. A compute shader gathers
the light each patch of floor gets from the surface above it; the floor
is seen through the surface, lit, and tinted by the depth. Showreel
0.1.25 with twenty-five effects.
@kevinraymond
kevinraymond merged commit 2b3f730 into main Oct 29, 2026
1 check passed
@kevinraymond
kevinraymond deleted the caustics-0.1.0 branch October 29, 2026 11:27
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