-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
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
quarticOut doesn't work correctly #7
Comments
I found the proper quartic function here https://github.com/zadvorsky/three.bas/tree/master/src/glsl. |
Ah, this might be a weird one that depends on undefined behavior in pow. I think it needs to be: float quarticOut(float t) {
return -pow(abs(t - 1.0), 3.0) * (1.0 - t) + 1.0;
} I'd actually just break it up and write: float quarticOut(float t) {
float tm1 = t - 1.0;
float tm1_2 = tm1 * tm1;
return 1.0 - tm1_2 * tm1_2;
} Through a weird quirk of glsl, the behavior |
Specifically, see: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/pow.xhtml
|
Whoa, thought this was a dead library, but I just happen to have encountered this same issue this morning using the cubic in-out function. Problem seems widespread here. Seems like in general a lot of these issues could just be avoided by using the form |
Correct! Though, as mentioned, I personally really try to avoid using So yes, as long as |
The visual result looks like a weird inversion
The text was updated successfully, but these errors were encountered: