mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Geometry Nodes: Fix vector math project bug
Implementation is incorrect compared to Cycles/Eevee. Reported by @DrDubosc in comments of T88922. Differential Revision: https://developer.blender.org/D12029
This commit is contained in:
parent
690fa2ba86
commit
d97e586f58
1 changed files with 1 additions and 1 deletions
|
|
@ -266,7 +266,7 @@ inline bool try_dispatch_float_math_fl3_fl3_to_fl3(const NodeVectorMathOperation
|
|||
return dispatch([](float3 a, float3 b) { return float3::cross_high_precision(a, b); });
|
||||
case NODE_VECTOR_MATH_PROJECT:
|
||||
return dispatch([](float3 a, float3 b) {
|
||||
float length_squared = float3::dot(a, b);
|
||||
float length_squared = float3::dot(b, b);
|
||||
return (length_squared != 0.0) ? (float3::dot(a, b) / length_squared) * b : float3(0.0f);
|
||||
});
|
||||
case NODE_VECTOR_MATH_REFLECT:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue