From 64f4f922b0b268634578fcc2038a23de47c7995b Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 7 Jul 2018 11:08:05 +0200 Subject: [PATCH] Fix the texel centers for motion search. Helps a whole lot. --- motion_search.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/motion_search.frag b/motion_search.frag index 262dca5..927ecc5 100644 --- a/motion_search.frag +++ b/motion_search.frag @@ -49,7 +49,7 @@ void main() { // Lock patch_bottom_left_texel to an integer, so that we never get // any bilinear artifacts for the gradient. - vec2 base = round(patch_bottom_left_texel * image_size) + vec2 base = (round(patch_bottom_left_texel * image_size - vec2(0.5, 0.5)) + vec2(0.5, 0.5)) * inv_image_size; // First, precompute the pseudo-Hessian for the template patch. -- 2.39.2