]> git.sesse.net Git - nageru/commitdiff
Fix a GLSL syntax error that tripped up NVIDIA.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 2 Aug 2018 15:20:32 +0000 (17:20 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 2 Aug 2018 15:20:32 +0000 (17:20 +0200)
motion_search.frag

index 05e901c12844cfa3dd38753435c4b8e649fd0144..136d316ef4cfe43ac4e4604e12379cec81be9385 100644 (file)
@@ -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) {