Skip to content

Commit 0d2899a

Browse files
Fixed useless editor repaint when using lod bias (#2601)
Co-authored-by: sebastienlagarde <[email protected]>
1 parent 96b49f5 commit 0d2899a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1212
### Fixed
1313
- Fixed probe volumes debug views.
1414
- Fixed issue displaying wrong debug mode in runtime debug menu UI.
15+
- Fixed useless editor repaint when using lod bias.
16+
- Fixed multi-editing with new light intensity slider.
1517

1618
## [10.2.0] - 2020-10-19
1719

@@ -101,7 +103,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
101103
- Fixed picking for materials with depth offset.
102104
- Fixed issue with exposure history being uninitialized on second frame.
103105
- Fixed issue when changing FoV with the physical camera fold-out closed.
104-
- Fixed multi-editing with new light intensity slider.
105106

106107
### Changed
107108
- Combined occlusion meshes into one to reduce draw calls and state changes with XR single-pass.

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3332,8 +3332,13 @@ ref HDCullingResults cullingResults
33323332
var initialMaximumLODLevel = QualitySettings.maximumLODLevel;
33333333
try
33343334
{
3335+
#if UNITY_2021_1_OR_NEWER
3336+
// Modifying the variables this way does not set the dirty flag, which avoids repainting all views
3337+
QualitySettings.SetLODSettings(hdCamera.frameSettings.GetResolvedLODBias(hdrp), hdCamera.frameSettings.GetResolvedMaximumLODLevel(hdrp), false);
3338+
#else
33353339
QualitySettings.lodBias = hdCamera.frameSettings.GetResolvedLODBias(hdrp);
33363340
QualitySettings.maximumLODLevel = hdCamera.frameSettings.GetResolvedMaximumLODLevel(hdrp);
3341+
#endif
33373342

33383343
// This needs to be called before culling, otherwise in the case where users generate intermediate renderers, it can provoke crashes.
33393344
BeginCameraRendering(renderContext, camera);
@@ -3397,8 +3402,12 @@ ref HDCullingResults cullingResults
33973402
}
33983403
finally
33993404
{
3405+
#if UNITY_2021_1_OR_NEWER
3406+
QualitySettings.SetLODSettings(initialLODBias, initialMaximumLODLevel, false);
3407+
#else
34003408
QualitySettings.lodBias = initialLODBias;
34013409
QualitySettings.maximumLODLevel = initialMaximumLODLevel;
3410+
#endif
34023411
}
34033412
}
34043413

0 commit comments

Comments
 (0)