X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=motion_search.frag;h=136d316ef4cfe43ac4e4604e12379cec81be9385;hb=e56a9f8e079421c9808fe1fd65519b7369c7961e;hp=05e901c12844cfa3dd38753435c4b8e649fd0144;hpb=e06e78acfbb4aadb33ea0bd438382132fb70cc43;p=nageru diff --git a/motion_search.frag b/motion_search.frag index 05e901c..136d316 100644 --- a/motion_search.frag +++ b/motion_search.frag @@ -124,7 +124,7 @@ void main() // sum(S^T * (x - y)) = [what we calculated] - (µ1 - µ2) sum(S^T) // // so we can just subtract away the mean difference here. - mean_diff = (warped_sum - template_sum) * (1.0 / (patch_size * patch_size)); + mean_diff = (warped_sum - template_sum) * (1.0 / float(patch_size * patch_size)); du -= grad_sum * mean_diff; if (i == 0) {