From: Steinar H. Gunderson Date: Thu, 5 Jul 2018 21:46:05 +0000 (+0200) Subject: Fix a sign error in the motion search. (The paper is not entirely clear on this,... X-Git-Tag: 1.8.0~76^2~243 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d567402be6554018899290ede7608c07540ff18c;p=nageru Fix a sign error in the motion search. (The paper is not entirely clear on this, but I am fairly certain it is right.) --- diff --git a/motion_search.frag b/motion_search.frag index d9d1f4e..a417834 100644 --- a/motion_search.frag +++ b/motion_search.frag @@ -133,7 +133,8 @@ void main() // so we can just subtract away the mean difference here. du -= grad_sum * (warped_sum - template_sum) * (1.0 / (patch_size * patch_size)); - u += (H_inv * du) * inv_image_size; + // Do the actual update. + u -= (H_inv * du) * inv_image_size; } // Reject if we moved too far.