X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=motion_search.frag;h=927ecc5634ef10488925bd4f5695cff2f02a614e;hb=64f4f922b0b268634578fcc2038a23de47c7995b;hp=262dca53a9bc8aaae7abb30e83b85fdd90c01173;hpb=a0f2ff60a1ac2de7b8b091be16737206319c6a39;p=nageru 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.