We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The current used impl of slerp uses sinTheta = sqrtf(1.0f - cosTheta * cosTheta); to approximate sine from cosine, accuracy is fine for runtime interpolation, but futher investigation is needed that would the accuracy match the needed of resampling? Also, how much would this impact the performance? Code here: https://github.com/recp/cglm/blob/44268d24f93f65d280a20ead64d96035cf91f765/include/cglm/quat.h#L727 Discussion about this on stackoverflow: https://stackoverflow.com/a/2683608
sinTheta = sqrtf(1.0f - cosTheta * cosTheta);
Some third-patry math libs that uses acos + sin:
acos
sin
Some third-party math libs that uses this algorithm:
Some uses other algorithm:
Extra: Vectorized sin might be used to accelerate the sinf, maybe something like:
The text was updated successfully, but these errors were encountered:
resample: precise slerp impl
20808a4
See #1
It shows ~11% slower on wasm, ~10% slower on simd, ~3% less frames.
before:
after:
Sorry, something went wrong.
https://github.com/amd/aocl-libm-ose/blob/master/src/optmized/vec/vrs4_sinf.c
No branches or pull requests
The current used impl of slerp uses
sinTheta = sqrtf(1.0f - cosTheta * cosTheta);
to approximate sine from cosine, accuracy is fine for runtime interpolation, but futher investigation is needed that would the accuracy match the needed of resampling?Also, how much would this impact the performance?
Code here: https://github.com/recp/cglm/blob/44268d24f93f65d280a20ead64d96035cf91f765/include/cglm/quat.h#L727
Discussion about this on stackoverflow: https://stackoverflow.com/a/2683608
Some third-patry math libs that uses
acos
+sin
:Some third-party math libs that uses this algorithm:
Some uses other algorithm:
Extra:
Vectorized sin might be used to accelerate the sinf, maybe something like:
The text was updated successfully, but these errors were encountered: