Repository navigation
ui: the underlay field: overlays inherit the page under them - #143
Merged
Merged
Conversation
An overlay had two ways to relate to the page under it, and both lost the position of the colour. A flat scrim says nothing about the page. A four-corner envelope can say the page is greenish, but not that the green sits on the left of the bottom edge. The underlay field is a third way: the frame is reduced to 15x8 cells, low-passed, graded and reconstructed to 60x32, then drawn as one magnified quad. There is no blur pass. GPU half (gfx.rs). `sample_underlay_field` copies the viewport, runs seven exact 2x box passes down to 15x8, then does one 480-byte `glReadPixels` per latch. It refuses to sample: - inside a blur source pass; - on a video-plane frame; - while the page is served from FrameCache; - under drawmask=field; - on a drawable the exact-2x chain cannot be built for. `draw_field` draws through `fs_field.frag` (one fetch, one multiply, the shared dither). It takes the slot of the dead `fs_modal_ground.frag`, so the dithered-program count stays at three. `Class::Field` joins the overdraw ledger and mask. CPU half (ui/underlay.rs). `UnderlayField` exposes `latch_from_frame`, `latch_from_corners` (the CPU source for the video plane and for frames before Home exists), `reset`, `sample`, `key` and `draw(Role)`. The Ground grade goes through `AmbientWash::keyed_one`, so a 120-cell ground and a four-corner ground share one palette. `Role::Dim` at weight 0, or on an unlatched field, draws exactly the plain `scrim_black` rect. The low-pass kernel is a literal table, pinned by a test against `exp`. RouteGround (settings, filmography, profiles, login, onboarding) now holds an `UnderlayField` in place of its private four-corner wash. It latches once from the live frame and falls back to the authored corners on any refusal. Deleted, all verified dead: - `Popover::modal_ground` and the chain behind it: `Glass::modal_ground`, `Painter::backdrop_blur_flat`, `draw_blur_snapshot_flat`, `fs_modal_ground.frag`, MPROG. - The five `MODAL_*` theme tokens that only that chain read. - `gfx::sample_modal_ambient` and `ModalAmbientSample`. Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ui: the underlay field: overlays inherit the page under them
An overlay had two ways to relate to the page under it, and both lost the
position of the colour. A flat scrim says nothing about the page. A
four-corner envelope can say the page is greenish, but not that the green
sits on the left of the bottom edge. The underlay field is a third way: the
frame is reduced to 15x8 cells, low-passed, graded and reconstructed to
60x32, then drawn as one magnified quad. There is no blur pass.
GPU half (gfx.rs).
sample_underlay_fieldcopies the viewport, runs sevenexact 2x box passes down to 15x8, then does one 480-byte
glReadPixelsper latch. It refuses to sample:
draw_fielddraws throughfs_field.frag(one fetch, one multiply, theshared dither). It takes the slot of the dead
fs_modal_ground.frag, sothe dithered-program count stays at three.
Class::Fieldjoins theoverdraw ledger and mask.
CPU half (ui/underlay.rs).
UnderlayFieldexposeslatch_from_frame,latch_from_corners(the CPU source for the video plane and for framesbefore Home exists),
reset,sample,keyanddraw(Role). TheGround grade goes through
AmbientWash::keyed_one, so a 120-cell groundand a four-corner ground share one palette.
Role::Dimat weight 0, oron an unlatched field, draws exactly the plain
scrim_blackrect. Thelow-pass kernel is a literal table, pinned by a test against
exp.RouteGround (settings, filmography, profiles, login, onboarding) now
holds an
UnderlayFieldin place of its private four-corner wash. Itlatches once from the live frame and falls back to the authored corners
on any refusal.
Deleted, all verified dead:
Popover::modal_groundand the chain behind it:Glass::modal_ground,Painter::backdrop_blur_flat,draw_blur_snapshot_flat,fs_modal_ground.frag, MPROG.MODAL_*theme tokens that only that chain read.gfx::sample_modal_ambientandModalAmbientSample.Second of the ambient layers, after #142. Then come the modal dims, the stress bench, the panel material and the transition hitches.
🤖 Generated with Claude Code