I just discovered that sign() is slow,and that it returns an int
So is there shorter faster code to do something like this?
float3 a;
if (a.x>0.0f){ a.x = 1.0f; } else{a.x = -1.0f;}
if (a.y>0.0f){ a.y = 1.0f; } else{a.y = -1.0f;}
if (a.z>0.0f){ a.z = 1.0f; } else{a.z = -1.0f;}