-
Notifications
You must be signed in to change notification settings - Fork 937
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
improves groundcover view distance #3219
Conversation
This PR currently experiences a bug associated with |
This PR should be complete now, but it could warrant some testing against different |
The general idea here looks good to me. Obviously, we want to figure out the cause of the terrain degradation, though. |
Thank you for the detailed testing. We appear to have experienced this degradation because my changes have revived some dead code in another module, but instead of being gifted additional functionality we have been gifted additional bugs in this case. I have now disabled this broken code and included some further cleanup. These latest changes should now work properly. It would be nice to test precisely the location on the above screenshot again if we have managed to save its coordinates. |
Smoke testing and review of the effected area shows that seems issues have been resolved with a nice boost in performance. Thanks @bosvensson1 and @akortunov |
We appear to have slipped in a mistake at the last minute that was not noticed because I had just tested (0, 0) origin coordinates and @psi29a did not use a |
That was my fault, I was trying to match up to the screenshoot from @akortunov ; I have validated again with the change. I will push the fix. |
This PR aims to solve all issues with
Groundcover
view distance handling in a satisfying way while preserving other optimisations that benefit other features. The main idea here is not to rely onViewData
updates for distance culling calculations because we can not accurately determine distance against lazily updated views. Instead, we perform an accurate measurement in a cull callback we can run every frame inGroundcover
itself. While we do have to add some code to handle this feature, it is quite loosely coupled code that could be useful elsewhere in the future. These changes should address a performance regression @akortunov experienced.