diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ae8d598958e..39cfafac08a 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed probe volumes debug views. - Fixed issue displaying wrong debug mode in runtime debug menu UI. +- Fixed useless editor repaint when using lod bias. +- Fixed multi-editing with new light intensity slider. ## [10.2.0] - 2020-10-19 @@ -101,7 +103,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed picking for materials with depth offset. - Fixed issue with exposure history being uninitialized on second frame. - Fixed issue when changing FoV with the physical camera fold-out closed. -- Fixed multi-editing with new light intensity slider. ### Changed - Combined occlusion meshes into one to reduce draw calls and state changes with XR single-pass. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index f7ad7baf6f3..500f03e1b97 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -3332,8 +3332,13 @@ ref HDCullingResults cullingResults var initialMaximumLODLevel = QualitySettings.maximumLODLevel; try { +#if UNITY_2021_1_OR_NEWER + // Modifying the variables this way does not set the dirty flag, which avoids repainting all views + QualitySettings.SetLODSettings(hdCamera.frameSettings.GetResolvedLODBias(hdrp), hdCamera.frameSettings.GetResolvedMaximumLODLevel(hdrp), false); +#else QualitySettings.lodBias = hdCamera.frameSettings.GetResolvedLODBias(hdrp); QualitySettings.maximumLODLevel = hdCamera.frameSettings.GetResolvedMaximumLODLevel(hdrp); +#endif // This needs to be called before culling, otherwise in the case where users generate intermediate renderers, it can provoke crashes. BeginCameraRendering(renderContext, camera); @@ -3397,8 +3402,12 @@ ref HDCullingResults cullingResults } finally { +#if UNITY_2021_1_OR_NEWER + QualitySettings.SetLODSettings(initialLODBias, initialMaximumLODLevel, false); +#else QualitySettings.lodBias = initialLODBias; QualitySettings.maximumLODLevel = initialMaximumLODLevel; +#endif } }