- // 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,
- // so we need to convert at the end.
+ // Fetch the initial guess for the flow, and convert from the previous size to this one.
+ vec2 initial_u = texture(flow_tex, flow_tc).xy * (image_size * inv_prev_level_size);