Skip to content

fix(zoom): fewer high-zoom jumps with the high resolution cursor, max zoom 30x - #438

Merged
Maxaubert merged 3 commits into
mainfrom
fix/429-high-zoom-shake
Oct 10, 2026
Merged

Maxaubert merged 3 commits into
mainfrom
fix/429-high-zoom-shake

Conversation

@Maxaubert

@Maxaubert Maxaubert commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Closes #429

What

With the high resolution cursor (smooth sampling), a slow zoom showed single-frame jumps of half a source pixel times the zoom (10 px at 20x, 20 px at 40x), 10-16 per 1x-50x zoom. Sharp sampling, fast zooms and panning were already clean.

  • Ladder direction (LadderDir, LadderHoldsLevel): the ramp direction now comes from the requests, not the level on screen. The ladder used to snap back below a request it had overtaken: 100 of 536 writes in a slow zoom went backwards. Now 0, and the jumps drop to 1-5 per zoom (1-2 in the final runs).
  • Landing: a zoom that stops at the maximum lands on it exactly.
  • Max zoom capped at 30x (maxLevel, quickZoomDefault, settings and tray sliders): above it the remaining jumps reach 15-25 px and the pointer runs off the screen. Slow 1x-30x zoom: 0, 0 and 4 jumps (max 15 px) in 3 runs.
  • txRampMinStep (off by default): above 12x, change the level only in steps of at least N per mille. 2 % removes the remaining jumps but made the top of a slow zoom visibly coarse in the field test, so it ships at 0.

Why the rest stays

The remaining jumps are inside DWM's smooth path, on about 1 % of level changes. They happen with or without the nudge, and the ladder predicts 0 px for those levels. DWM's centre formula, decompiled ((int)((P - (W/z)/2) * z + 0.5) on the integer cursor point), is exactly what Wind writes. So only fewer level changes remove them, which costs fine steps.

Measured (slow 1x-50x zoom, hard single-frame jumps over 6 px per zoom)

Build Runs
main 0.27.0 16, 10
this PR 5, 6, 5, 3, 3, 3; final build 2, 2, 1
with 2 % steps (rejected, coarse) 0 in 8 runs

Steps above 30x: median 0.28 % every 7 ms; max level 50.0; no backward writes. Report: Documents\Claude\research\wind\2026-10-10-high-zoom-shake.md.

Tests

  • build.bat test: 610 passed, 0 failed (new: ladder direction, step hold and stop; 30x clamp).
  • Playwright: 191 passed (slider range now 2-30x).
  • build.bat and build.bat config build clean. Installed locally as 0.27.1.

Version: 0.27.0 -> 0.27.1 (fix). Release unsigned as before.

🤖 Generated with Claude Code

https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu

Maxaubert and others added 2 commits October 10, 2026 09:58
…lution cursor; 0.27.1

While DWM centres, every level write can show one frame off DWM's centre by the fraction of its
learned offset times the zoom (10-25 px at 25-50x). Smooth sampling only:
- the ladder takes the ramp direction from the requests (LadderDir): it used to snap back below a
  request it had overtaken, so 19 % of the writes in a slow zoom stepped backwards;
- above 12x the level moves in steps of at least 2 % (txRampMinStep=20, txRampMinFrom=12,
  RampStepHeld); a zoom that stops at the maximum lands on it exactly.
Slow 1x-50x zoom: 10-16 jumps per zoom before, none in 8 runs after; fast zoom 0 in 3 runs.

Closes #429

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu
Field test: 2 % steps made the top of a slow zoom visibly coarse. The remaining jumps are inside
DWM's smooth path (about 1 % of level changes, half a source pixel; with or without the nudge, and
DWM's decompiled centre formula matches Wind's write exactly), so only fewer level changes remove
them. Fine steps win: txRampMinStep defaults to 0. The ladder direction fix stays (jumps 10-16 ->
1-5 per slow 1x-50x zoom), and a zoom that stops at the maximum still lands on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu
@Maxaubert Maxaubert changed the title fix(transform): no single-frame jumps at high zoom with the high resolution cursor fix(transform): fewer high-zoom jumps with the high resolution cursor Oct 10, 2026
Above 30x the remaining smooth-path jumps reach 15-25 px and the pointer runs off the screen, and
they cannot be removed without coarse steps. maxLevel and quickZoomDefault clamp to 30; the settings
and tray sliders end at 30x. Slow 1x-30x zoom: 0, 0 and 4 jumps (max 15 px) in 3 runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu
@Maxaubert Maxaubert changed the title fix(transform): fewer high-zoom jumps with the high resolution cursor fix(zoom): fewer high-zoom jumps with the high resolution cursor, max zoom 30x Oct 10, 2026
@Maxaubert
Maxaubert merged commit d11117e into main Oct 10, 2026
1 check passed
@Maxaubert
Maxaubert deleted the fix/429-high-zoom-shake branch October 10, 2026 17:54
Maxaubert added a commit that referenced this pull request Oct 10, 2026
* feat(zoom): full release glide with the high resolution cursor; 0.28.0

The glide was cut short (#375) and then turned off (#427) because its slow tail shook and showed
the image doubled. That was the ladder stepping back below a request it had overtaken, fixed in
#438. Measured 2026-10-10 (speed 2.7, 115 ms): the glide runs 490-550 ms instead of 240-260 ms,
no backward step, no jump, pointer steady (max 5 px). EaseOutShouldStop is gone and the Release
glide setting is live again with the high resolution cursor.

Closes #439

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu

* fix(zoom): high resolution glide stops just before its slow tail

Field: the full tail lands in ladder hops, which read as shake. The glide now stops on the level on
screen once it moves less per frame than clean levels are apart (EaseOutShouldStop, restored):
240-260 ms of glide at speed 2.7 / 115 ms, no backward step, pointer steady. 0.27.1 had none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

High zoom: single frames show the cursor 6-25 px off while zooming (DWM centring race)

1 participant