Skip to content

New tooltip for camera background and fixed exposure when switching the background mode. #415

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
May 14, 2020
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 @@ -598,6 +598,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed assert on tests caused by probe culling results being requested when culling did not happen. (case 1246169)
- Fixed over consumption of GPU memory by the Physically Based Sky.
- Fixed an invalid rotation in Planar Reflection Probe editor display, that was causing an error message (case 1182022)
- Put more information in Camera background type tooltip and fixed inconsistent exposure behavior when changing bg type.

### Changed
- Improve MIP selection for decals on Transparents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static partial class HDCameraUI

const string msaaWarningMessage = "Manual MSAA target set with deferred rendering. This will lead to undefined behavior.";

static readonly GUIContent clearModeContent = EditorGUIUtility.TrTextContent("Background Type", "Specifies the type of background the Camera applies when it clears the screen before rendering a frame.");
static readonly GUIContent clearModeContent = EditorGUIUtility.TrTextContent("Background Type", "Specifies the type of background the Camera applies when it clears the screen before rendering a frame. Be aware that when setting this to None, the background is never cleared and since HDRP shares render texture between cameras, you may end up with garbage from previous rendering.");
static readonly GUIContent backgroundColorContent = EditorGUIUtility.TrTextContent("Background Color", "The Background Color used to clear the screen when selecting Background Color before rendering.");
static readonly GUIContent cullingMaskContent = EditorGUIUtility.TrTextContent("Culling Mask");
static readonly GUIContent volumeLayerMaskContent = EditorGUIUtility.TrTextContent("Volume Layer Mask");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ internal HDAdditionalCameraData.ClearColorMode clearColorMode
}
}

HDAdditionalCameraData.ClearColorMode m_PreviousClearColorMode = HDAdditionalCameraData.ClearColorMode.None;


internal Color backgroundColorHDR
{
get
Expand Down Expand Up @@ -505,7 +508,7 @@ internal void SetReferenceSize()
RTHandles.SetReferenceSize(actualWidth, actualHeight, msaaSamples);
m_HistoryRTSystem.SwapAndSetReferenceSize(actualWidth, actualHeight, msaaSamples);
}

// Updating RTHandle needs to be done at the beginning of rendering (not during update of HDCamera which happens in batches)
// The reason is that RTHandle will hold data necessary to setup RenderTargets and viewports properly.
internal void BeginRender(CommandBuffer cmd)
Expand Down Expand Up @@ -888,9 +891,11 @@ void UpdateAntialiasing()
}

// When changing antialiasing mode to TemporalAA we must reset the history, otherwise we get one frame of garbage
if (previousAntialiasing != antialiasing && antialiasing == AntialiasingMode.TemporalAntialiasing)
if ( (previousAntialiasing != antialiasing && antialiasing == AntialiasingMode.TemporalAntialiasing)
|| (m_PreviousClearColorMode != clearColorMode))
{
resetPostProcessingHistory = true;
m_PreviousClearColorMode = clearColorMode;
}
}

Expand Down