blob: 299380975470476cd739d171c0d012d2f408a276 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
diff --git a/src/renderer.c b/src/renderer.c
index 1f67bc3..7df525e 100644
--- a/src/renderer.c
+++ b/src/renderer.c
@@ -1761,6 +1761,13 @@ static bool pass_read_image(struct pass_state *pass)
ref_rounded.y0 = truncf(ref_rc.y0);
ref_rounded.x1 = ref_rounded.x0 + roundf(pl_rect_w(ref_rc));
ref_rounded.y1 = ref_rounded.y0 + roundf(pl_rect_h(ref_rc));
+ // Oversample to avoid distortion when really zoomed in.
+ // @TODO: Verbosely log offset/base/stretch/scale to try and understand what's happening here.
+ //const float oversample = 3;
+ //ref_rounded.x0 -= oversample;
+ //ref_rounded.y0 -= oversample;
+ //ref_rounded.x1 += oversample;
+ //ref_rounded.y1 += oversample;
PL_TRACE(rr, "Rounded reference rect: {%d %d %d %d}",
ref_rounded.x0, ref_rounded.y0,
|