- equation.x = floatBitsToUint(1.0 / A11);
- equation.y = floatBitsToUint(A12);
- equation.z = floatBitsToUint(1.0 / A22);
- equation.w = pack_floats_shared(b1, b2);
+ uvec4 ret;
+ ret.x = floatBitsToUint(1.0 / A11);
+ ret.y = floatBitsToUint(A12);
+ ret.z = floatBitsToUint(1.0 / A22);
+ ret.w = pack_floats_shared(b1, b2);
+ return ret;
+}
+
+void main()
+{
+ uvec4 eq0 = compute_equation(tc0, tc_left0, tc_down0);
+ uvec4 eq1 = compute_equation(tc1, tc_left1, tc_down1);
+
+ if ((int(round(line_offset)) & 1) == 1) {
+ // Odd line, so the right value is red.
+ equation_red = eq1;
+ equation_black = eq0;
+ } else {
+ equation_red = eq0;
+ equation_black = eq1;
+ }