]> git.sesse.net Git - nageru/blobdiff - motion_search.frag
Finish up the variational refinement, conceptually. Of course, it doesn't work yet.
[nageru] / motion_search.frag
index 769038977bd97b5724e70716e8e4770dc33c7f9d..188f5c3da22b73361a810d382cd8d83cbdab0433 100644 (file)
@@ -90,16 +90,8 @@ void main()
 
        mat2 H_inv = inverse(H);
 
-       // Fetch the initial guess for the flow. (We need the normalization step
-       // because densification works by accumulating; see the comments on the
-       // Densify class.)
-       vec3 prev_flow = texture(flow_tex, flow_tc).xyz;
-       vec2 initial_u;
-       if (prev_flow.z < 1e-3) {
-               initial_u = vec2(0.0, 0.0);
-       } else {
-               initial_u = prev_flow.xy / prev_flow.z;
-       }
+       // Fetch the initial guess for the flow.
+       vec2 initial_u = texture(flow_tex, flow_tc).xy;
 
        // Note: The flow is in OpenGL coordinates [0..1], but the calculations
        // generally come out in pixels since the gradient is in pixels,