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

Investigate performance of InverseLerp vs. smoothstep #115

Closed
Delt06 opened this issue Jul 20, 2023 · 1 comment
Closed

Investigate performance of InverseLerp vs. smoothstep #115

Delt06 opened this issue Jul 20, 2023 · 1 comment
Labels
Enhancement Improvement over existing functionality Lighting/Shadows Lighting, shadows, GI, etc.
Milestone

Comments

@Delt06
Copy link
Owner

Delt06 commented Jul 20, 2023

  • InverseLerp might be faster than smoothstep due to simpler calculations.
  • Test how much it affects the default shader.
  • Make sure to avoid division in the main code path.
  • Compare visuals.
  • If visuals are that different, consider adding a multi compile option?
@Delt06 Delt06 added Enhancement Improvement over existing functionality Lighting/Shadows Lighting, shadows, GI, etc. labels Jul 20, 2023
@Delt06 Delt06 added this to the v0.6.0 milestone Jul 20, 2023
@Delt06
Copy link
Owner Author

Delt06 commented Jul 20, 2023

Baseline:

image

InverseLerp (no divisions): ~8.5% faster

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement over existing functionality Lighting/Shadows Lighting, shadows, GI, etc.
Projects
None yet
Development

No branches or pull requests

1 participant