mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-28 03:57:57 -06:00
At Fit the loupe was softer than a good downscale of the same file. Four resamples stacked up between the source and the screen: - the render edge is rounded up to a 64 px step, so the texture was drawn up to ~6 % smaller than its size and the GPU shrank it with 2-tap bilinear sampling; - the fitted texture sat on a fractional pixel position, so even at the right size every screen pixel was averaged with its neighbour (#1831 fixed the same for 100 %); - the render box truncated its short side (2560 x 1706 for a 2560 x 1707 source), a slightly anisotropic resample that blurred one axis only; - the codec's decode-time shrink at 2:1 and more, and SourceRef::Fit, used a box filter, which halves the contrast of detail near the output's limit. RenderJob::display_fit shrinks a full-quality render that is larger than its drawn size to exactly that size with Lanczos-3 on the worker (after the caches have the full render; drafts untouched; part of the key). The Detail view sets it for the After and Before renders at rest, and snap_fit_rect draws a texture that is its drawn size on whole physical pixels. The render boxes round their short side, and the 2:1-and-more shrinks use Lanczos-3. Refs #1472, #1042. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>