Skip to content
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

Add ExpDecay function for framerate independent damping #2301

Open
tebjan opened this issue Jun 1, 2024 · 2 comments
Open

Add ExpDecay function for framerate independent damping #2301

tebjan opened this issue Jun 1, 2024 · 2 comments
Labels
area-Math Issues related to the Stride.Core.Mathematics namespace enhancement New feature or request

Comments

@tebjan
Copy link
Member

tebjan commented Jun 1, 2024

Is your feature request related to a problem? Please describe.
See, Lerp smoothing is broken, click the video below:
Enhanced Exponential Decay Function Explanation

Describe the solution you'd like
image

instead of:
a = lerp(a, b, damping * dt)

Implementations for both, C# and SDSL.

Here are some questions that can aid in the description of the feature request:

  • What are the use cases?
    Daping between two values over time for smooth motion
@tebjan tebjan added the enhancement New feature or request label Jun 1, 2024
@Eideren Eideren added the area-Math Issues related to the Stride.Core.Mathematics namespace label Jun 1, 2024
@Kryptos-FR
Copy link
Member

The only issue is that exp() is more expensive computationally.

@tebjan
Copy link
Member Author

tebjan commented Jun 2, 2024

The more important issue ist that Lerp smoothing doesn't work correctly. Watch the first half of the video. Especially if you want to deliver a consistent user experience on all machines. It might not affect SFX too badly, but if gameplay relies on it, no option has better performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Math Issues related to the Stride.Core.Mathematics namespace enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants