From de5a1b7d840c1dfef0b95ffaa7a1ba558d4cf2ed Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 14 Apr 2020 18:30:39 +0200 Subject: [PATCH 1/6] Update HDRenderPipeline.cs --- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 211325b3b38..25338e7bb08 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -677,7 +677,7 @@ void SetRenderingFeatures() { reflectionProbeModes = SupportedRenderingFeatures.ReflectionProbeModes.Rotation, defaultMixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly, - mixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly | SupportedRenderingFeatures.LightmapMixedBakeModes.Shadowmask, + mixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly | (m_Asset.currentPlatformRenderPipelineSettings.supportShadowMask ? SupportedRenderingFeatures.LightmapMixedBakeModes.Shadowmask : 0), lightmapBakeTypes = LightmapBakeType.Baked | LightmapBakeType.Mixed | LightmapBakeType.Realtime, lightmapsModes = LightmapsMode.NonDirectional | LightmapsMode.CombinedDirectional, lightProbeProxyVolumes = true, @@ -693,6 +693,8 @@ void SetRenderingFeatures() , overridesLODBias = true , overridesMaximumLODLevel = true , terrainDetailUnsupported = true + , overridesShadowMask = true // Don't display the shadow mask UI in Quality Settings + , overridesRealtimeReflectionProbes = true // Don't display the real time reflection probes checkbox UI in Quality Settings }; Lightmapping.SetDelegate(GlobalIlluminationUtils.hdLightsDelegate); From 0d02074b62e01be06b054149084221797165a342 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 14 Apr 2020 18:46:10 +0200 Subject: [PATCH 2/6] Update HDRenderPipeline.cs --- .../RenderPipeline/HDRenderPipeline.cs | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) 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 25338e7bb08..24a8f018246 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -102,6 +102,12 @@ internal static Volume GetOrCreateDefaultVolume() readonly PostProcessSystem m_PostProcessSystem; readonly XRSystem m_XRSystem; + // Keep track of previous Graphic and QualitySettings value to reset when switching to another pipeline + bool m_previousLightsUseLinearIntensity; + bool m_previoulightsUseColorTemperature; + bool m_previousSRPBatcher; + ShadowmaskMode m_previousShadowMaskMode; + bool m_FrameSettingsHistoryEnabled = false; /// @@ -668,11 +674,17 @@ void SetRenderingFeatures() Shader.globalRenderPipeline = "HDRenderPipeline"; // HD use specific GraphicsSettings + m_previousLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity; GraphicsSettings.lightsUseLinearIntensity = true; + m_previoulightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; GraphicsSettings.lightsUseColorTemperature = true; - + m_previousSRPBatcher = GraphicsSettings.useScriptableRenderPipelineBatching; GraphicsSettings.useScriptableRenderPipelineBatching = m_Asset.enableSRPBatcher; + // In case shadowmask mode isn't setup correctly, force it to correct usage (as there is no UI to fix it) + m_previousShadowMaskMode = QualitySettings.shadowmaskMode; + QualitySettings.shadowmaskMode = ShadowmaskMode.DistanceShadowmask; + SupportedRenderingFeatures.active = new SupportedRenderingFeatures() { reflectionProbeModes = SupportedRenderingFeatures.ReflectionProbeModes.Rotation, @@ -784,10 +796,12 @@ void UnsetRenderingFeatures() { Shader.globalRenderPipeline = ""; - SupportedRenderingFeatures.active = new SupportedRenderingFeatures(); + GraphicsSettings.lightsUseLinearIntensity = m_previousLightsUseLinearIntensity; + GraphicsSettings.lightsUseColorTemperature = m_previoulightsUseColorTemperature; + GraphicsSettings.useScriptableRenderPipelineBatching = m_previousSRPBatcher; + QualitySettings.shadowmaskMode = m_previousShadowMaskMode; - // Reset srp batcher state just in case - GraphicsSettings.useScriptableRenderPipelineBatching = false; + SupportedRenderingFeatures.active = new SupportedRenderingFeatures(); Lightmapping.ResetDelegate(); } From e082ae4646f054e52d6caf793e6a0f74ecdb45b2 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 14 Apr 2020 20:01:58 +0200 Subject: [PATCH 3/6] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 38855887f58..eae03ed1f7c 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -528,6 +528,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed MSAA depth resolve when there is no motion vectors - Fixed various object leaks in HDRP. - Fixed compile error with XR SubsystemManager. +- Fixed shadowmask UI now correctly showing shadowmask disable ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled @@ -638,6 +639,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Moved scene view camera settings for HDRP from the preferences window to the scene view camera settings window. - Updated shaders to be compatible with Microsoft's DXC. - Debug exposure in debug menu have been replace to debug exposure compensation in EV100 space and is always visible. +- Shadowmask and realtime reflectoin probe property are hide in Quality settings ## [7.1.1] - 2019-09-05 From 710437e67ef9b30e98f00b51add59d6fdaebee67 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Wed, 15 Apr 2020 01:06:42 +0200 Subject: [PATCH 4/6] Update HDRenderPipeline.cs --- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 24a8f018246..0116bee00e0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -705,7 +705,7 @@ void SetRenderingFeatures() , overridesLODBias = true , overridesMaximumLODLevel = true , terrainDetailUnsupported = true - , overridesShadowMask = true // Don't display the shadow mask UI in Quality Settings + , overridesShadowmask = true // Don't display the shadow mask UI in Quality Settings , overridesRealtimeReflectionProbes = true // Don't display the real time reflection probes checkbox UI in Quality Settings }; From 9fab3185727a9b31ea98ec2d034160c48dbe31a5 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Wed, 15 Apr 2020 11:19:35 +0200 Subject: [PATCH 5/6] fix typo --- .../RenderPipeline/HDRenderPipeline.cs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) 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 0116bee00e0..5a538378e58 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -103,10 +103,10 @@ internal static Volume GetOrCreateDefaultVolume() readonly XRSystem m_XRSystem; // Keep track of previous Graphic and QualitySettings value to reset when switching to another pipeline - bool m_previousLightsUseLinearIntensity; - bool m_previoulightsUseColorTemperature; - bool m_previousSRPBatcher; - ShadowmaskMode m_previousShadowMaskMode; + bool m_PreviousLightsUseLinearIntensity; + bool m_PreviouslightsUseColorTemperature; + bool m_PreviousSRPBatcher; + ShadowmaskMode m_PreviousShadowMaskMode; bool m_FrameSettingsHistoryEnabled = false; @@ -674,15 +674,15 @@ void SetRenderingFeatures() Shader.globalRenderPipeline = "HDRenderPipeline"; // HD use specific GraphicsSettings - m_previousLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity; + m_PreviousLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity; GraphicsSettings.lightsUseLinearIntensity = true; - m_previoulightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; + m_PreviouslightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; GraphicsSettings.lightsUseColorTemperature = true; - m_previousSRPBatcher = GraphicsSettings.useScriptableRenderPipelineBatching; + m_PreviousSRPBatcher = GraphicsSettings.useScriptableRenderPipelineBatching; GraphicsSettings.useScriptableRenderPipelineBatching = m_Asset.enableSRPBatcher; // In case shadowmask mode isn't setup correctly, force it to correct usage (as there is no UI to fix it) - m_previousShadowMaskMode = QualitySettings.shadowmaskMode; + m_PreviousShadowMaskMode = QualitySettings.shadowmaskMode; QualitySettings.shadowmaskMode = ShadowmaskMode.DistanceShadowmask; SupportedRenderingFeatures.active = new SupportedRenderingFeatures() @@ -796,10 +796,10 @@ void UnsetRenderingFeatures() { Shader.globalRenderPipeline = ""; - GraphicsSettings.lightsUseLinearIntensity = m_previousLightsUseLinearIntensity; - GraphicsSettings.lightsUseColorTemperature = m_previoulightsUseColorTemperature; - GraphicsSettings.useScriptableRenderPipelineBatching = m_previousSRPBatcher; - QualitySettings.shadowmaskMode = m_previousShadowMaskMode; + GraphicsSettings.lightsUseLinearIntensity = m_PreviousLightsUseLinearIntensity; + GraphicsSettings.lightsUseColorTemperature = m_PreviouslightsUseColorTemperature; + GraphicsSettings.useScriptableRenderPipelineBatching = m_PreviousSRPBatcher; + QualitySettings.shadowmaskMode = m_PreviousShadowMaskMode; SupportedRenderingFeatures.active = new SupportedRenderingFeatures(); From db0750d725a2c43c23583a972f0ac00069694eea Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Wed, 15 Apr 2020 11:24:24 +0200 Subject: [PATCH 6/6] fix typo 2 --- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 5a538378e58..240efaca76f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -104,7 +104,7 @@ internal static Volume GetOrCreateDefaultVolume() // Keep track of previous Graphic and QualitySettings value to reset when switching to another pipeline bool m_PreviousLightsUseLinearIntensity; - bool m_PreviouslightsUseColorTemperature; + bool m_PreviousLightsUseColorTemperature; bool m_PreviousSRPBatcher; ShadowmaskMode m_PreviousShadowMaskMode; @@ -676,7 +676,7 @@ void SetRenderingFeatures() // HD use specific GraphicsSettings m_PreviousLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity; GraphicsSettings.lightsUseLinearIntensity = true; - m_PreviouslightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; + m_PreviousLightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; GraphicsSettings.lightsUseColorTemperature = true; m_PreviousSRPBatcher = GraphicsSettings.useScriptableRenderPipelineBatching; GraphicsSettings.useScriptableRenderPipelineBatching = m_Asset.enableSRPBatcher; @@ -797,7 +797,7 @@ void UnsetRenderingFeatures() Shader.globalRenderPipeline = ""; GraphicsSettings.lightsUseLinearIntensity = m_PreviousLightsUseLinearIntensity; - GraphicsSettings.lightsUseColorTemperature = m_PreviouslightsUseColorTemperature; + GraphicsSettings.lightsUseColorTemperature = m_PreviousLightsUseColorTemperature; GraphicsSettings.useScriptableRenderPipelineBatching = m_PreviousSRPBatcher; QualitySettings.shadowmaskMode = m_PreviousShadowMaskMode;