Skip to content

Raise the deep-zoom preview margin cap. - #1260

Merged
echelon merged 1 commit into
storytold:mainfrom
vbasky:fix/1146-preview-margin
Oct 13, 2026
Merged

echelon merged 1 commit into
storytold:mainfrom
vbasky:fix/1146-preview-margin

Conversation

@vbasky

@vbasky vbasky commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #1146.

The preview window margin stopped at 768 pixels. On a wide frame the highlights, clarity, and dehaze kernels reach about 4.5 percent of the long edge, so the cap clipped them. The cap is now 3072 pixels, still snapped to the window grid.

@AlexChambers

Copy link
Copy Markdown
Contributor

A data point for #1146: raising the cap lets the kernels reach further, but part of the Dehaze difference doesn't depend on the margin at all.

Windows use the proxy's airlight, while a full render (no window) uses the full-resolution dark channel. So with Dehaze, even a window covering the whole frame differs from the full render. Test case on main 76b5377: a deterministic 601 × 403 source, V2, Dehaze 100, Draft, rendered to 1800 × 1207. The whole-frame window is up to 48 code values off (mean 0.94), the same on CPU and Metal. Partial windows compared against that whole-frame window agree to within 1 to 2, so the remaining Dehaze error is mostly that one airlight value.

I have a branch that grows each window by every active filter's reach, gives windows the full render's airlight, and aligns the reduced-resolution planes with the full frame's grid. I'll open it once its review is done; it can go on top of this one.

@AlexChambers

Copy link
Copy Markdown
Contributor

The branch I mentioned is now up as #1390, stacked on #1147. It gives native zoom windows each active filter's full reach and the full render's airlight, so whole-frame windows match the full render exactly, and partial windows are within one code value of it. The web build keeps main's margin policy for now, because exact windows can exceed the web worker's memory. This PR's larger cap still helps there.

@echelon

echelon commented Oct 13, 2026

Copy link
Copy Markdown
Member

Landed on main in #1426 — thank you, @vbasky, for the contribution! If you haven't already, come join us on Discord: https://discord.gg/artcraft

@vbasky
vbasky deleted the fix/1146-preview-margin branch October 13, 2026 04:39
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.

Zoom windows: the 768 px margin cap leaves Dehaze up to 49 LSB off at 8:1 (14 LSB at 4:1)

3 participants