From: Steinar H. Gunderson Date: Sat, 7 Jul 2018 09:08:05 +0000 (+0200) Subject: Fix the texel centers for motion search. Helps a whole lot. X-Git-Tag: 1.8.0~76^2~233 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=64f4f922b0b268634578fcc2038a23de47c7995b;p=nageru Fix the texel centers for motion search. Helps a whole lot. --- 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.