You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Composition 2 is the Gallery's second entry. It's a heat map on a wall of square LED cells, and the pointer leaves a comet of hot cells behind it. Every part it needs has shipped, so this PR assembles the document.
What changes
The composition
bit-comet/composition.ts stacks FractalNoise, CursorTrail, PaletteMap, and LedWall. Risograph is the default preset. Thermal, Infrared, and Newsprint each list only what they change, and each one sets its gutter color through LedWall's panelColor. The field's ramp stops at the edge of the hottest color's band, so a solid patch of that color always marks the pointer. The comments in the composition document the formula.
Controls
The panel has one color control per palette color, then Drift, Scale, Angle, Heat radius, and Trail length. Color 5 and Color 6 show only on the six-color presets.
Registration and tests
Bit comet comes after Reeded glass in COMPOSITIONS and in scripts/build-posters.sh, with golden files for every preset. gallery-bit-comet.spec.ts asserts WebGL2 and takes one baseline per preset. The Mac and Linux baselines are byte-identical, because PaletteMap snaps each cell to a flat color.
GPU readings
These are median GPU times from /dev/composition-benchmark, at 2× on the M1 Max, with a 3272×1392 buffer:
Preset
GPU ms
Risograph
5.28
Thermal
5.41
Infrared
5.28
Newsprint
5.23
Reeded glass reads 3.23 ms on the same machine, which matches its own PR.
Known limitations
Every preset is over the 4 ms budget. Each of FractalNoise's six octaves costs about 0.45 ms. Two octaves read 3.9 ms but soften the field, so the author kept six. SHA-314 tracks drawing the field once per cell instead of once per pixel.
The poster has the mismatch that SHA-306 describes. A Gallery card shrinks the 1080×720 poster to 288–440 px, so its 8 CSS px cells read as 2–3 px. When the card goes live, they jump to 8 px.
The author's reduced-motion check is still pending.
Bit comet is a heat map on a wall of square LED cells. Moving the pointer
across it leaves a comet of hot cells behind. The stack is FractalNoise,
CursorTrail, PaletteMap, and LedWall. Risograph is the default preset.
Thermal, Infrared, and Newsprint are the other presets.
The field's ramp stops at the edge of the hottest color's band. Away from
the comet, the dither gives at most half the cells that color, scattered,
so a solid patch of it always marks the pointer.
The commit registers the composition after Reeded glass, adds its golden
files and Gallery poster, and adds a visual spec with a baseline for each
preset on WebGL2.
Refs SHA-313
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The wording incorrectly implies a per-cell execution optimization, but the resample chain runs per output pixel and only shares cell-center sampling coordinates.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The preset snapshots never move the pointer over the canvas, so a rendering regression in the comet would go undetected without a clock-controlled moving or held-pointer test covering the hot core and cooling tail.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Add pointer-driven snapshots to verify comet rendering
The preset snapshots never move the pointer over the canvas, so they do not exercise this composition's comet and would still pass if it stopped rendering. Keep those baselines and add a clock-controlled moving/held-pointer case, following apps/docs-tests/visual/cursor-trail.spec.ts, to verify the hot core and cooling tail through PaletteMap and LedWall.
Not adding pointer-driven snapshots to this PR. SHA-313 keeps the Bit comet spec at rest with no pointer, so its baselines don't depend on EXT_color_buffer_float. Reeded glass has the same gap, so pointer coverage for compositions belongs in a follow-up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Composition 2 is the Gallery's second entry. It's a heat map on a wall of square LED cells, and the pointer leaves a comet of hot cells behind it. Every part it needs has shipped, so this PR assembles the document.
What changes
The composition
bit-comet/composition.tsstacks FractalNoise, CursorTrail, PaletteMap, and LedWall. Risograph is the default preset. Thermal, Infrared, and Newsprint each list only what they change, and each one sets its gutter color through LedWall'spanelColor. The field's ramp stops at the edge of the hottest color's band, so a solid patch of that color always marks the pointer. The comments in the composition document the formula.Controls
The panel has one color control per palette color, then Drift, Scale, Angle, Heat radius, and Trail length. Color 5 and Color 6 show only on the six-color presets.
Registration and tests
Bit comet comes after Reeded glass in
COMPOSITIONSand inscripts/build-posters.sh, with golden files for every preset.gallery-bit-comet.spec.tsasserts WebGL2 and takes one baseline per preset. The Mac and Linux baselines are byte-identical, because PaletteMap snaps each cell to a flat color.GPU readings
These are median GPU times from
/dev/composition-benchmark, at 2× on the M1 Max, with a 3272×1392 buffer:Reeded glass reads 3.23 ms on the same machine, which matches its own PR.
Known limitations
Closes SHA-313