Skip to content

Fixed broken rendering when duplicating a camera while the Rendering Debugger is opened. #6289

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

Merged
merged 3 commits into from
Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed light mode not available after switching a light to area "Disc" or "Tube" (case 1372588).
- Fixed CoC size computation when dynamic resolution is enabled
- Fixed shadow cascade transition not working properly with bias.
- Fixed broken rendering when duplicating a camera while the Rendering Debugger is opened.

### Changed
- Optimizations for the physically based depth of field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,11 @@ void OnEnable()
m_Camera.allowMSAA = false; // We don't use this option in HD (it is legacy MSAA) and it produce a warning in the inspector UI if we let it
m_Camera.allowHDR = false;

// By doing that, we force the update of frame settings debug data once. Otherwise, when the Rendering Debugger is opened,
// Wrong data is registered to the undo system because it did not get the chance to be updated once.
FrameSettings dummy = new FrameSettings();
FrameSettingsHistory.AggregateFrameSettings(ref dummy, m_Camera, this, HDRenderPipeline.currentAsset, null);
Comment on lines +693 to +696
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then shouldn't it be in RegisterDebug()? It would be more clear no?


RegisterDebug();

#if UNITY_EDITOR
Expand Down