Fix: Geometry Nodes: Breaks of rotation value in Sample UV node #122741

Open
Iliya Katushenock wants to merge 3 commits from mod_moder/blender:rot_mix3 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

View File

@ -22,8 +22,10 @@ math::Quaternion mix3(const float3 &weights,
const math::Quaternion &v1,
const math::Quaternion &v2)
{
const float3 expmap_mixed = mix3(weights, v0.expmap(), v1.expmap(), v2.expmap());
return math::Quaternion::expmap(expmap_mixed);
const float v0_v1_weight = math::safe_divide(weights[0], weights[0] + weights[1]);
const float v0_v2_weight = math::safe_divide(weights[0], weights[0] + weights[2]);
const float v1_v2_weight = math::safe_divide(weights[1], weights[1] + weights[2]);
return mix2(v1_v2_weight, mix2(v0_v1_weight, v0, v1), mix2(v0_v2_weight, v0, v2));
}
template<>