]> git.sesse.net Git - nageru/blobdiff - motion_search.frag
Fix a sign error in the motion search. (The paper is not entirely clear on this,...
[nageru] / 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.