Repository navigation
Fix #57 : huge re-entry effects from camera-attached helper meshes - #58
Open
RELMYMathieu wants to merge 1 commit into
Open
RELMYMathieu wants to merge 1 commit into
RELMYMathieu wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #57
What changed
Utils.IsCameraAttachment(). For a given renderer, it goes through its parents one by one until it reaches the part, and returns true if one of them is aCameraor theFlightCamerarig. Real part meshes are never children of a camera, so normal vessels aren't affected by thisCreatePartEnvelopeandCalculateVesselBoundsnow skip renderers that are attached to a camera. InCalculateVesselBoundsthis check happens before the mesh is read, so Firefly doesn't clone other mods' meshesResetPartModelCache()now runs beforeCalculateVesselBounds, so the bounds and the envelopes always come from the same fresh renderer list, which also removes the "only sometimes" part of the bugThis PR has fixes, which aren't specific to Deferred as explained in the issue this patches. Anything a mod hangs under a camera (Deferred's quad, EVE's
ScreenSpaceShadowsManager...) is skipped. The checks only run when the effects are built.Testing
Used the same SEP booster re-entry in a quick save before entry threshold, as in the issue, with the fix:
Possible follow-up
Not in this PR, but a per-mesh size limit (around 1 km? whichever you deem reasonable) could be a nice addition, to guard from any future helper mesh with fake bounds that we might not catch, although I can't imagine such a case. I've also fell down a rabbit hole regarding issue #55 and have a few ideas on how to fix it, but I don't know if it's maybe too much, would like to hear from you.
Anyways, hope this helps! Don't hesitate to ask if you have any questions and edit anything at your own discretion!