Skip to content

Stop Uber from running if no effect that needs it is enabled #6804

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 5 commits into from
Jan 31, 2022
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 @@ -79,6 +79,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed cached directional light shadows disappearing without reappearing when the going outside of the range of shadow validity.
- Fixed an issue where sometimes full screen debug would cause render graph errors.
- Fixed a nullref exception when creating a new scene while LightExplorer is open.
- Fixed issue that caused the uber post process to run even if nothing is to be done, leading to different results when disabling every post process manually vs disabling the whole post-processing pipeline.

## [14.0.0] - 2021-11-17

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4614,6 +4614,14 @@ class UberPostPassData
TextureHandle UberPass(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle logLut, TextureHandle bloomTexture, TextureHandle source)
{
bool isSceneView = hdCamera.camera.cameraType == CameraType.SceneView;
var featureFlags = GetUberFeatureFlags(isSceneView);
// If we have nothing to do in Uber post we just skip it.
if (featureFlags == UberPostFeatureFlags.None && !m_ColorGradingFS && !m_BloomFS &&
m_CurrentDebugDisplaySettings.data.fullScreenDebugMode != FullScreenDebugMode.ColorLog)
{
return source;
}

using (var builder = renderGraph.AddRenderPass<UberPostPassData>("Uber Post", out var passData, ProfilingSampler.Get(HDProfileId.UberPost)))
{
TextureHandle dest = GetPostprocessOutputHandle(renderGraph, "Uber Post Destination");
Expand All @@ -4622,7 +4630,7 @@ TextureHandle UberPass(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle
// if they are used or not so they can set default values if needed
passData.uberPostCS = defaultResources.shaders.uberPostCS;
passData.uberPostCS.shaderKeywords = null;
var featureFlags = GetUberFeatureFlags(isSceneView);

passData.uberPostKernel = passData.uberPostCS.FindKernel("Uber");
if (PostProcessEnableAlpha())
{
Expand Down