]> git.sesse.net Git - nageru/commitdiff
Fix a sign error in the motion search. (The paper is not entirely clear on this,...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 5 Jul 2018 21:46:05 +0000 (23:46 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 5 Jul 2018 21:46:05 +0000 (23:46 +0200)
motion_search.frag

index d9d1f4eb4997c7650fb0f4902acf2c42b5ff4e4c..a417834ff3fc72c5121fb144c3a373df6d71da3b 100644 (file)
@@ -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.