mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Mathlib: enable SIMD quaternions
Should match output code with the code in the game executable, as that has been compiled with SIMD enabled.
This commit is contained in:
parent
bd6ffaf226
commit
c6e2d5e31a
@ -62,5 +62,6 @@ target_precompile_headers( ${PROJECT_NAME} PRIVATE
|
||||
)
|
||||
target_compile_definitions( ${PROJECT_NAME} PRIVATE
|
||||
"BUILDING_MATHLIB"
|
||||
"ALLOW_SIMD_QUATERNION_MATH"
|
||||
$<$<OR:$<CONFIG:Debug>,$<CONFIG:Profile>>:DEBUG_MATHLIB>
|
||||
)
|
||||
|
@ -421,8 +421,8 @@ FORCEINLINE fltx4 QuaternionSlerpNoAlignSIMD(const fltx4& p, const fltx4& q, flo
|
||||
SubFloat(result, 1) = SubFloat(q, 0);
|
||||
SubFloat(result, 2) = -SubFloat(q, 3);
|
||||
SubFloat(result, 3) = SubFloat(q, 2);
|
||||
sclp = sin((1.0f - t) * (0.5f * M_PI));
|
||||
sclq = sin(t * (0.5f * M_PI));
|
||||
sclp = (float)sin((1.0f - t) * (0.5f * M_PI));
|
||||
sclq = (float)sin(t * (0.5f * M_PI));
|
||||
SubFloat(result, 0) = sclp * SubFloat(p, 0) + sclq * SubFloat(result, 0);
|
||||
SubFloat(result, 1) = sclp * SubFloat(p, 1) + sclq * SubFloat(result, 1);
|
||||
SubFloat(result, 2) = sclp * SubFloat(p, 2) + sclq * SubFloat(result, 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user