Page MenuHome

Geometry Nodes: Fix vector math project bug
ClosedPublic

Authored by Charlie Jolly (charlie) on Jul 26 2021, 12:03 PM.

Details

Summary

Implementation is incorrect compared to Cycles/Eevee, length is incorrectly calculated.

Reported by @Robin Betts (DrDubosc) in comments of T88922.

Eevee:

void vector_math_project(
    vec3 a, vec3 b, vec3 c, float scale, out vec3 outVector, out float outValue)
{
  float lenSquared = dot(b, b);
  outVector = (lenSquared != 0.0) ? (dot(a, b) / lenSquared) * b : vec3(0.0);
}

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 16028
Build 16028: arc lint + arc unit