I'm trying to come up with a function that temporarily, gradually slows down at ...

@runevision@mastodon.gamedev.place

I'm trying to come up with a function that temporarily, gradually slows down at two specified times, with a given slowdown factor and slowdown influence range. But anything I can think of seems to involve solving inverse functions or integrals, which feels too complex for what this problem.

I have a solution for *one* slowdown, but applying it twice make the two interfere with each other in an incorrect way.
shadertoy.com/view/NfVXRR

Edit: Solved. See replies.