Both functions have the same purpose, so theoretically there is no need to have both.
But they have some differences:
resolve_tri_uv_v2:
Advantages:
- Much more precise because it works with double precision.
- The name is consistent with the existing ones: resolve_tri_uv_v3, resolve_quad_uv_v2, resolve_quad_uv_v2_deriv, resolve_quad_u_v2.
Differences:
- Returns a vector with 2 dimensions (uv[2]).
- If the triangle has zero area the returned vector is {0.0f, 0.0f}.
barycentric_weights_v2:
Advantages:
- Intensively used throughout the code.
- 30% more efficient.
Differences:
- Returns a vector with 3 dimensions (w[3]).
- If the triangle has zero area the returned vector is {0.333f, 0.333f, 0.333f}.
Proposed change:
- make barycentric_weights_v2 work with double precision (even losing performance).
- Replace 'resolve_tri_uv_v2' with it.
(The multires bake code has been tested with the patch).