Skip to content

Commit

Permalink
Use t4 instead of t
Browse files Browse the repository at this point in the history
  • Loading branch information
redorav committed Apr 21, 2023
1 parent 34cdf38 commit 3305152
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/hlsl++_quaternion.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ namespace hlslpp
n128 t4 = _hlslpp_perm_xxxx_ps(t); // Contains t, t, t, t

n128 q1_minus_q0 = _hlslpp_sub_ps(q1, q0); // q1 - q0
n128 lerp = _hlslpp_madd_ps(t, q1_minus_q0, q0); // q0 * (1 - t) + q1 * t
n128 lerp = _hlslpp_madd_ps(t4, q1_minus_q0, q0); // q0 * (1 - t) + q1 * t

n128 result = _hlslpp_mul_ps(lerp, _hlslpp_rsqrt_ps(_hlslpp_dot4_ps(lerp, lerp)));

Expand Down

0 comments on commit 3305152

Please sign in to comment.