Blur the fold's side gaps together with the desktop and offer a black fill - #18
Merged
Merged
Conversation
… fill The tapered fold leaves gaps at the upper sides of the display. They were filled with the stretched broad blur of the desktop edge and drawn beside a separately blurred desktop, so a visible seam ran along the fold's edge. The fill and the desktop are now blurred as one surface. Each blur level is computed from a composite that places the fill in a side margin around the reduced frame, so blurred content spreads across the edge toward the top while the lower edge stays sharp. A new Sides setting chooses the fill: the stretched blur, as before, or black. The choice is saved and applies on the next frame. Per captured frame this adds one scale into the composite, plus a quarter-size broad blur and a copy for the stretched fill. On an M1 Max the blur chain measured about 0.2 ms per captured frame, up from 0.11 ms, and the fold pass is unchanged at about 0.15 ms.
|
@ReffWu is attempting to deploy a commit to the MagicAPI Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reachedNext included review available in 44 minutes. View limit detailsLimit details: You’ve used the included review currently available. This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Comment |
# Conflicts: # Sources/SettingsView.swift
The padding around the blur composite has to cover the widest point of the projection. That width comes from the taper constant in Fold.metal, but the padding was an independent 0.16 in the renderer, so changing the taper would have clamped the fill at the top corners with nothing to catch it. Pass the taper through FoldParameters and size the padding from the same value.
The black fill went through the same bilinear stretch as the blurred one, relying on an identity scale to land the reduced frame on exact texel centres, and it held on to the quarter-size textures it never read. Clear the composite instead and let the existing blit place the frame, so both fills share one exact copy and black needs neither the scratch textures nor the stretch. encodeBlur now reports whether it encoded anything. Warm-up raises the preparation error it used to raise before the blur moved into its own method, and a failed frame leaves blurredGeneration alone so the next frame retries.
# Conflicts: # Sources/LiveDesktop.swift
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.
The tapered fold leaves gaps at the upper sides of the display. They were filled with the stretched broad blur of the desktop edge and drawn beside a separately blurred desktop, so a visible seam ran along the fold's edge.
The fill and the desktop are now blurred as one surface. Each blur level is computed from a composite that places the fill in a side margin around the reduced frame, so blurred content spreads across the edge toward the top while the lower edge stays sharp. A new Sides setting chooses the fill: the stretched blur, as before, or black.
Left to right, fully closed: the previous blur fill, the new blur fill, and the new black fill. The bottom row zooms into the top-left gap, where the old seam shows. The renders use
web/assets/demo-poster.jpgas a stand-in desktop.Validated with
swift-format lint --strict Sources/*.swift,python3 scripts/check.py policy,make build, andxcrun -sdk macosx metal -c Resources/Fold.metal.