Repository navigation
Crop the top and blur by distance as the lid closes - #24
Merged
Merged
Conversation
Two new Look settings, both on by default, make the fold behave more like a real lid seen from a normal seat. Crop from the top keeps the bottom row at the hinge and samples only the lower cos(0.65 x 90 degrees x progress) of the desktop, so the top slides out of view as the lid closes. The full cosine matches a viewer looking straight at the lid but read as too much stretch from above the screen. Blur by distance sets the blur from each point's distance to where the open screen stood, its height above the hinge times sin(90 degrees x progress), so the hinge stays sharp and the blur keeps growing toward the top until the lid is shut. With it off, the current falloff is kept.
|
@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 58 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 |
pulkitxm
approved these changes
Sep 15, 2026
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.
Two new Look settings, both on by default, bring the fold closer to what a real lid does when you watch it close from your seat.
Crop from the top. A closing lid seen from the front gets shorter, so less of the desktop should fit. The bottom row stays at the hinge and the shader samples only the lower cos(0.65 x 90 degrees x progress) of the desktop, so the top slides out of view. The full cosine (the bottom 71 percent at half closure) matches a viewer looking straight at the lid, but from a normal seat above the screen it read as too much stretch. With 0.65 it keeps about 87 percent at half closure and 52 percent when shut.
Blur by distance. Blur follows each point's distance from where the open screen stood: its height above the hinge times sin(90 degrees x progress). The hinge edge stays sharp at every angle and the blur keeps growing toward the top until the lid is shut. Turning it off keeps the current falloff.
Both are one extra term each in
Fold.metal, driven by two newFoldParametersfields, with no new passes or textures, and each toggle applies on the next frame without restarting capture. MOTION.md describes both.Happy to flip either default to off if you would rather keep today's look as the default.
Validated with
swift-format lint --strict Sources/*.swift,python3 scripts/check.py policy, andmake build. The comparison above was rendered offscreen throughDesktopRenderer, which compilesFold.metalat runtime.