-
Notifications
You must be signed in to change notification settings - Fork 20
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
Optimise VectorLine camera projection for improved Map View performance #281
base: dev
Are you sure you want to change the base?
Conversation
I would recommend validating your results by comparing them to the original method results. KSPCommunityFixes/KSPCommunityFixes/Performance/FlightIntegratorPerf.cs Lines 684 to 729 in 93b57a1
|
- Check against frame count - Add viewport struct - Remove vector allocations
Orbit rendering takes up a significant majority of the frame time with a large number of orbit lines visible in the Map View, which is mainly caused by camera projection done by VectorLine.
This patch improves performance by caching the camera's projection matrix multiplied with its view matrix once per frame, and replacing calls to different camera projection functions in VectorLine with our cached versions.
Will write a full description with some benchmarking results when the patch is more complete.