if (r_deriv) {
float tmp1[2], tmp2[2], s[2], t[2];
-
+
/* clear outputs */
zero_v2(r_deriv[0]);
zero_v2(r_deriv[1]);
-
+
sub_v2_v2v2(tmp1, st1, st0);
sub_v2_v2v2(tmp2, st2, st3);
interp_v2_v2v2(s, tmp1, tmp2, r_uv[1]);
/* -7f causes instability/glitches with Bendy Bones + Custom Refs */
const float eps = 1e-5f;
-
+
const float tan_dot = dot_v3v3(tan_l, tan_r);
if (tan_dot > 1.0f - eps) {
/* no angle difference (use fallback, length wont make any difference) */