Improve label rendering, fix crash when changing model flags#5459
Merged
sturnclaw merged 10 commits intopioneerspacesim:masterfrom Dec 26, 2022
Merged
Improve label rendering, fix crash when changing model flags#5459sturnclaw merged 10 commits intopioneerspacesim:masterfrom
sturnclaw merged 10 commits intopioneerspacesim:masterfrom
Conversation
- Flush worldview command buffer before processing UI code, allows rendering to partially overlap with UI code and prevents use-after-free if rendering resources are deleted during UI processing.
Returns a normalized copy of the given matrix.
Use FileSystem::JoinPath to avoid throwing an error with a parent path.
Label3D now renders anti-aliased SDF font edges to scale better to very large and small sizes. Label3D nodes now have their name set correctly by the import pipeline.
Drop the use of std::shared_ptr and replace with RefCountedPtr.
Also explicitly default the move constructor for TaskSet::Handle.
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.
This PR is a general catch-all of various "engine" changes I've made over the last 5 months or so.
The headlining feature is an improved shader for the Label3D model node. I've added anti-aliasing to the SDF font rendering to avoid the persistent jagged edges that showed up even with MSAA enabled. This is most visible on ships as their ID number.
I've also made a change to flush the renderer's command buffer "early" before the UI is drawn, to avoid crashes caused by a resource in the command buffer being deleted by model code. This isn't a perfect solution, but it gets the crashes out of the way for now without costing much (if any) performance.
This PR also includes a new "hierarchy" tab for the ModelViewer, which shows the computed node structure of the loaded model. It's not 100% complete, but already quite useful when developing the clickable cockpit branch.
Finally, I've included a few general engine-related cleanup and internal-feature commits that I've managed to pull out of the cockpit/MFD branch; these simply improve code quality and provide more utility to future developers.