float mul(vec3, vec3)
GregorGullwi opened this issue · comments
Gregor Gullwi commented
The library converts all mul() calls to regular multiplication operations, but there's a special case that doesn't work and that's when it's assigned to a scalar and not a vector.
The example I have is:
float3 aVector = float3(1, 2, 3);
float a = mul(aVector, aVector);
it currently converts to:
float a = ( aVector * aVector );
which doesn't compile... it should be a dot product instead:
float a = dot(aVector, aVector);