-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
Add Model Viewer Widget #5613
Merged
sturnclaw
merged 18 commits into
pioneerspacesim:master
from
sturnclaw:model-viewer-widget
Sep 8, 2023
Merged
Add Model Viewer Widget #5613
sturnclaw
merged 18 commits into
pioneerspacesim:master
from
sturnclaw:model-viewer-widget
Sep 8, 2023
Conversation
This file contains 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
Core code for viewing models implemented in terms of a movable + resizable window for use during live gameplay or in editor. Dependent on the "editor app" framework, for intended use inside a greater editor context. Further work required for use in-game.
- Add "model" tab for animation+pattern+colors - Add menu bar widget to select light setup - Refactor custom widget code into Editor::Draw - Add menu extension points via virtual functions
- Dock subwindows in model viewer app host window - Move most controls to dropdowns in model viewer widget - Add UI extension delegates to render extra menu items - Clean up all duplicated rendering + loading code
- Overwrites the user's saved dock node layout, but ensures a consistent interface on each run
5a81aa9
to
aa0f6c9
Compare
- Copy/Blit and MSAA resolve operations added to command list - Proper render target state tracking in OGL::RenderStateCache - Fix hidden bugs with render target creation
- GuiApplication is now responsible for creating the MSAA backbuffer target for rendering. - Graphics::Renderer::StateTicket resets render target + viewport state on cleanup - Removed Renderer::SetClearColor et al, clears are expected to provide an explicit clear color. - Active render target state is still messy; we want to reduce overall state tracking. - GuiApplication can own the window backbuffer but a GBuffer/color buffer should be owned by some scene-rendering related facility.
- Fix invalid lighting data being inherited from previous render passes - Add MSAA and resolve pass to ModelSpinner viewport rendering
aa0f6c9
to
c0eb789
Compare
MSAA has been re-enabled and this PR includes a set of bugfixes for rendering-related issues that have cropped up as part of this series of PRs. Pending further testing by interested parties, this PR is now ready for merge. |
- On Nvidia, MSAA resolve uses a different, higher-quality sampling filter when resolving to the window backbuffer. - This difference is very perceptible when rendering thin lines with high contrast. - This does not present a significant performance cost on mid-high spec systems. Ideally this workaround is dynamically enabled based on driver version etc.
c0eb789
to
46ac5c7
Compare
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 rewrites the old ModelViewer interface into a new, docking-enabled viewport widget which can be used portably as part of a larger editor, and a set of sidebar panels which no longer draw over the viewport.
A picture is worth a thousand words, or so they say. Here's the old interface:
And here's the new interface:
2023-08-26.15-40-31.mp4
The major win here is that the model viewer now renders to an ImGui window instead of the fullscreen backbuffer, which means we can use it in many different contexts, potentially even in a running game.
TODO: