-
Notifications
You must be signed in to change notification settings - Fork 118
Description
Summary
When content is authored-scaled down to an extreme factor (example: 0.01×), the rendered result looks as if all geometry is snapped/quantized to the device pixel grid (blocky / “pixel snapped” appearance). However, when scaling back up (e.g. 100× or 101×), the result becomes visually identical to the original design, which suggests the authored values are not permanently modified—this appears to be a renderer behavior at small effective geometry sizes.
This is especially noticeable when the downscaled scene still occupies a small but non-trivial device-space area (e.g. ~10×21px in the screenshot), where many independent shapes appear to collapse/align to the same pixel grid.
Expected behavior
Scaling authored geometry down should produce a visually consistent rasterization of the same design at that scale:
- subpixel geometry should be handled via normal coverage / anti-aliasing rules
- shapes shouldn’t “snap” to a coarse pixel grid as if their positions/sizes were quantized
Actual behavior
At extreme authored downscales (e.g. 0.01×):
- the output looks pixel-snapped/quantized, affecting even simple filled rectangles (not just strokes)
- scaling back up restores the original look (suggesting the problem is not from the authored model, but from rendering at tiny effective sizes)
Reproduction notes / evidence
- The issue reproduces with simple rect geometry (not dependent on strokes).
- Attached screenshots show the effect clearly under “ISSUE HERE”.
Skia sanity check
A minimal skia-safe reproduction indicates Skia itself does not “force tiny rects to 1px” in a simple way:
- A 0.1×0.1 rect on a 1×1 surface with AA off can produce no coverage
- With AA on, it produces partial coverage
- If the canvas is scaled such that the rect becomes 1×1 in device space, the pixel becomes fully covered
This suggests the observed snapping is more likely due to the rendering pipeline / transforms / caching / bounds decisions rather than a basic Skia limitation.
Why this matters
This breaks visual fidelity for workflows that rely on “authoring-time scale” (baking scale into geometry/props). Users expect:
- extreme downscale to look like a small version of the same design (even if it becomes hard to see)
- zooming back in to reveal a faithful miniature rendering, not a snapped/quantized one
Possible directions (non-prescriptive)
Potential areas to inspect:
- any float→int conversions, snapping, or “minimum device pixel” logic in the renderer
- picture/layer recording bounds and clip/saveLayer bounds behavior at tiny scales
- any caching logic that rasterizes at small sizes and reuses results
original, left, scaled 0.01x, then 100x back, right.
0.01x scaled version of the original. (wrong)
