From 82ea2268c2987a054c1c88462f2d28b8e3f591af 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 be8af6df0b4..8f6443932f7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -669,7 +669,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, @@ -685,6 +685,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 0f3e8182b616827294354467ac6bdbdc10615084 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 8f6443932f7..4bdaae9e098 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -103,6 +103,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; /// @@ -660,11 +666,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, @@ -776,10 +788,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 bb611fe0b99fe23570aca633f9c1d73cd13b2152 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 14 Apr 2020 20:43:15 +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 95651cd1f71..87352f88cfa 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where changing the default volume profile from another inspector would not update the default volume editor. - Fixed path validation when creating new volume profile (case 1229933) - Fix for range compression factor for probes going negative (now clamped to positive values). +- Fixed shadowmask UI now correctly showing shadowmask disable ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. @@ -48,6 +49,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Optimized PrepareLightsForGPU (cost reduced by over 25%) and PrepareGPULightData (around twice as fast now). - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. - Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. +- Shadowmask and realtime reflectoin probe property are hide in Quality settings ## [7.3.0] - 2020-03-11 From ca68b85f181dc316ddf2b6ca6e20ae88f9ed5ad7 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Wed, 15 Apr 2020 01:03:17 +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 4bdaae9e098..ab07970211b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -697,7 +697,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 b2a686c3ebbf60cebaf25587cb40122f2044ac0a 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 ab07970211b..0db59e9bb97 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -104,10 +104,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; @@ -666,15 +666,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() @@ -788,10 +788,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 a5e97e53837fba0a7c5e192e2782908b13625021 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Wed, 15 Apr 2020 11:23:00 +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 0db59e9bb97..3c8dad3b247 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -105,7 +105,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; @@ -668,7 +668,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; @@ -789,7 +789,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;