]> git.sesse.net Git - nageru/blobdiff - motion_search.frag
Update some comments.
[nageru] / motion_search.frag
index 5f2b6f8c2e1c79ffaee0de5b9c04ace4153b0f1d..0c5dcc4c1e68810d12d220f9af3cfe6d76d4e5c8 100644 (file)
@@ -95,6 +95,10 @@ void main()
        } else {
                initial_u = prev_flow.xy / prev_flow.z;
        }
+
+       // Note: The flow is in OpenGL coordinates [0..1], but the calculations
+       // generally come out in pixels since the gradient is in pixels,
+       // so we need to convert at the end.
        vec2 u = initial_u;
 
        for (uint i = 0; i < num_iterations; ++i) {