diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d593c300cf8..d451b6992f4 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed error when increasing the maximum planar reflection limit (case 1306530). - Fixed alpha output in debug view and AOVs when using shadow matte (case 1311830). - Fixed an issue with transparent meshes writing their depths and recursive rendering (case 1314409). +- Fixed issue with compositor custom pass hooks added/removed repeatedly (case 1315971). ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard diff --git a/com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs index 4ebc91559a6..1536e3e7845 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs @@ -61,6 +61,10 @@ public bool enableOutput { if (m_OutputCamera) { + // If the state did not change, don't do anything + if (m_OutputCamera.enabled == value) + return; + m_OutputCamera.enabled = value; // Aside from the output compositor camera, we also have to change the cameras of the layers @@ -496,7 +500,7 @@ public void UpdateLayerSetup() void Update() { // TODO: move all validation calls to onValidate. Before doing it, this needs some extra testing to ensure nothing breaks - if (ValidatePipeline() == false || ValidateAndFixRuntime() == false || RuntimeCheck() == false) + if (enableOutput == false || ValidatePipeline() == false || ValidateAndFixRuntime() == false || RuntimeCheck() == false) { return; }