chore(archive): land the prototype finale into main #11

Merged
iuriishikov merged 3 commits from glass-pr1 into main 2026-07-20 13:21:41 +00:00
Owner

The archive was showing the second-to-last version of the prototype.

main sat three commits behind the actual finale: the texture backdrop with its
procedural fallback (4691cf6), the moiré/milk fix (420edbb), and the mip pyramid,
adaptive milk and Regular/Clear/Identity switch (137a342). All three lived only in
glass-pr1, pushed but never merged — so anyone opening this repository to see what
eight iterations achieved saw the wrong thing. The project chronicle already recorded
one wrong statement because of it.

No review needed here: this code was migrated into shikos-iced-liquid-glass and
reviewed there as PR #1. The commits land as they are — no rebase, no squash, no
rewritten messages. glass-pr1 stays as history.

The SPDX identifier in this repository is still the invalid bare form; that is fixed
in a separate task, against the merged tree.

The archive was showing the second-to-last version of the prototype. `main` sat three commits behind the actual finale: the texture backdrop with its procedural fallback (`4691cf6`), the moiré/milk fix (`420edbb`), and the mip pyramid, adaptive milk and Regular/Clear/Identity switch (`137a342`). All three lived only in `glass-pr1`, pushed but never merged — so anyone opening this repository to see what eight iterations achieved saw the wrong thing. The project chronicle already recorded one wrong statement because of it. No review needed here: this code was migrated into `shikos-iced-liquid-glass` and reviewed there as PR #1. The commits land as they are — no rebase, no squash, no rewritten messages. `glass-pr1` stays as history. The SPDX identifier in this repository is still the invalid bare form; that is fixed in a separate task, against the merged tree.
Load assets/backdrop.png at pipeline startup (image crate, png-only
features) into an Rgba8UnormSrgb texture with a linear clamp-to-edge
sampler; every backdrop lookup — base, the three dispersion channels,
blur taps and the low-frequency milk layer — goes through one dispatcher
that samples the texture cover-fit for the widget aspect. A missing or
undecodable file logs a warn and falls back to the procedural test scene
(1x1 white placeholder keeps the bind group layout uniform). Uniform
block grows to 64 bytes (backdrop_mode + cover-fit scale), layout test
updated. Preview raised to 640x400 with the window sized to fit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Moire came from minifying the full-size texture without mipmaps: the
backdrop is now downscaled on the CPU at load (larger side to 1280 px,
~2x the preview, Triangle filter) so bilinear sampling stays alias-free;
no mip chain, per the calibration note. MATERIAL_TINT alpha drops
0.8 -> 0.4 (effective veil 0.32) so content reads through the glass on
bright backdrops; adapting the tint to backdrop luminance stays a
section-2 item. Verified that tint, soft layer and blur apply strictly
inside the shape: outside the AA band the fragment returns the plain
sharp backdrop sample.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat: mip-pyramid sampling, adaptive milk and material variants
All checks were successful
ci / ci-1 (push) Successful in 3m33s
ci / ci (push) Successful in 0s
ci / ci-1 (pull_request) Successful in 2m33s
ci / ci (pull_request) Successful in 0s
137a342d2d
The CPU now builds the full mip chain of the backdrop (successive x0.5
Triangle downscales to 1x1, one write_texture per level) and every
backdrop read is a single trilinear textureSampleLevel: refraction and
dispersion at lod = log2(1 + blur/2), the milk layer and luma probes at
maxLod - 2 — one mechanism replaces the spiral blur taps, the IGN
rotation and the 9-tap low-pass comb, and stays smooth over the whole
blur range. Regular milk is adaptive per Apple behavior: five probes
under the shape average the backdrop luma, k = smoothstep(0.35, 0.65)
picks veil color (dark glass on dark content) and opacity (0.55 -> 0.34,
thinner on light content); vibrancy chroma lift is x1.2. New
glass::Variant { Regular, Clear, Identity } cycled by a panel button:
Clear is a fixed 0.10 veil plus a bottom-dark scrim, Identity returns
the bare backdrop as the reference. Window sized to the 1000x700
preview. Procedural fallback keeps working; blur is inert there (the
scene has no mip pyramid).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
shikos/shikos-glass-scratch!11
No description provided.