// Simplified version of the code below, assuming diff_flow == 0.0f everywhere.
diff_flow.x = omega * b.x * inv_A11;
diff_flow.y = omega * b.y * inv_A22;
// Simplified version of the code below, assuming diff_flow == 0.0f everywhere.
diff_flow.x = omega * b.x * inv_A11;
diff_flow.y = omega * b.y * inv_A22;
b += smooth_r * textureOffset(diff_flow_tex, tc, ivec2( 1, 0)).xy;
b += smooth_d * textureOffset(diff_flow_tex, tc, ivec2( 0, -1)).xy;
b += smooth_u * textureOffset(diff_flow_tex, tc, ivec2( 0, 1)).xy;
b += smooth_r * textureOffset(diff_flow_tex, tc, ivec2( 1, 0)).xy;
b += smooth_d * textureOffset(diff_flow_tex, tc, ivec2( 0, -1)).xy;
b += smooth_u * textureOffset(diff_flow_tex, tc, ivec2( 0, 1)).xy;
- diff_flow = texture(diff_flow_tex, tc).xy;
+
+ if (num_nonzero_phases == 1) {
+ diff_flow = vec2(0.0f);
+ } else {
+ diff_flow = texture(diff_flow_tex, tc).xy;
+ }