X Tutup
Skip to content

Improve label rendering, fix crash when changing model flags#5459

Merged
sturnclaw merged 10 commits intopioneerspacesim:masterfrom
sturnclaw:microfixes
Dec 26, 2022
Merged

Improve label rendering, fix crash when changing model flags#5459
sturnclaw merged 10 commits intopioneerspacesim:masterfrom
sturnclaw:microfixes

Conversation

@sturnclaw
Copy link
Member

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.

- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

X Tutup