diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 37a4880ff32..1de80679631 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -80,6 +80,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue with physically-based DoF computation and transparent materials with depth-writes ON. - Fixed issue of accessing default frame setting stored in current HDRPAsset instead fo the default HDRPAsset - Fixed SSGI frame setting not greyed out while SSGI is disabled in HDRP Asset +- Fixed ability to override AlphaToMask FrameSetting while camera in deferred lit shader mode +- Fixed Missing lighting quality settings for SSGI (case 1312067). ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs index 33194fafde6..75c32b8c7df 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs @@ -108,6 +108,13 @@ public class GeneralSection public static readonly GUIContent RTGIDenoiserRadius = EditorGUIUtility.TrTextContent("Denoiser Radius"); public static readonly GUIContent RTGISecondDenoise = EditorGUIUtility.TrTextContent("Second Denoiser Pass"); + // SSGI + public static readonly GUIContent SSGISettingsSubTitle = EditorGUIUtility.TrTextContent("Screen Space Global Illumination"); + public static readonly GUIContent SSGIRaySteps = EditorGUIUtility.TrTextContent("Ray Steps"); + public static readonly GUIContent SSGIRadius = EditorGUIUtility.TrTextContent("Radius"); + public static readonly GUIContent SSGIClampValue = EditorGUIUtility.TrTextContent("Clamp Value"); + public static readonly GUIContent SSGIFilterRadius = EditorGUIUtility.TrTextContent("Filter Radius"); + // Fog public static readonly GUIContent FogSettingsSubTitle = EditorGUIUtility.TrTextContent("Volumetric Fog"); public static readonly GUIContent FogSettingsBudget = EditorGUIUtility.TrTextContent("Volumetric Fog Budget"); diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs index c9a650b1482..33f7d36598e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -47,7 +47,8 @@ enum Expandable RTAOQuality = 1 << 31, RTRQuality = 1 << 32, RTGIQuality = 1 << 33, - VolumetricClouds = 1 << 34 + SSGIQuality = 1 << 34, + VolumetricClouds = 1 << 35 } static readonly ExpandedState k_ExpandedState = new ExpandedState(Expandable.CameraFrameSettings | Expandable.General, "HDRP"); @@ -102,7 +103,8 @@ static HDRenderPipelineUI() CED.FoldoutGroup(Styles.SSRSettingsSubTitle, Expandable.SSRQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionSSRQualitySettings), CED.FoldoutGroup(Styles.RTRSettingsSubTitle, Expandable.RTRQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionRTRQualitySettings), CED.FoldoutGroup(Styles.FogSettingsSubTitle, Expandable.FogQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionFogQualitySettings), - CED.FoldoutGroup(Styles.RTGISettingsSubTitle, Expandable.RTGIQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionRTGIQualitySettings) + CED.FoldoutGroup(Styles.RTGISettingsSubTitle, Expandable.RTGIQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionRTGIQualitySettings), + CED.FoldoutGroup(Styles.SSGISettingsSubTitle, Expandable.SSGIQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionSSGIQualitySettings) ), CED.FoldoutGroup(Styles.materialSectionTitle, Expandable.Material, k_ExpandedState, Drawer_SectionMaterialUnsorted), CED.FoldoutGroup(Styles.postProcessSectionTitle, Expandable.PostProcess, k_ExpandedState, Drawer_SectionPostProcessSettings), @@ -1148,6 +1150,45 @@ static void Drawer_SectionRTGIQualitySettings(SerializedHDRenderPipelineAsset se } } + static private bool m_ShowSSGILowQualitySection = false; + static private bool m_ShowSSGIMediumQualitySection = false; + static private bool m_ShowSSGIHighQualitySection = false; + + static void DrawSSGIQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) + { + ++EditorGUI.indentLevel; + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.SSGIRaySteps.GetArrayElementAtIndex(tier), Styles.SSGIRaySteps); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.SSGIFilterRadius.GetArrayElementAtIndex(tier), Styles.SSGIFilterRadius); + --EditorGUI.indentLevel; + } + + static void Drawer_SectionSSGIQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) + { + m_ShowSSGILowQualitySection = EditorGUILayout.Foldout(m_ShowSSGILowQualitySection, Styles.lowQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowSSGILowQualitySection); + if (m_ShowSSGILowQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.Low; + DrawSSGIQualitySetting(serialized, quality); + } + + m_ShowSSGIMediumQualitySection = EditorGUILayout.Foldout(m_ShowSSGIMediumQualitySection, Styles.mediumQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowSSGIMediumQualitySection); + if (m_ShowSSGIMediumQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.Medium; + DrawSSGIQualitySetting(serialized, quality); + } + + m_ShowSSGIHighQualitySection = EditorGUILayout.Foldout(m_ShowSSGIHighQualitySection, Styles.highQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowSSGIHighQualitySection); + if (m_ShowSSGIHighQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.High; + DrawSSGIQualitySetting(serialized, quality); + } + } + static void Drawer_SectionRenderingUnsorted(SerializedHDRenderPipelineAsset serialized, Editor owner) { EditorGUILayout.PropertyField(serialized.renderPipelineSettings.colorBufferFormat, Styles.colorBufferFormatContent); diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedLightingQualitySettings.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedLightingQualitySettings.cs index a484827a0c5..4c489cfb96c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedLightingQualitySettings.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedLightingQualitySettings.cs @@ -46,6 +46,10 @@ class SerializedLightingQualitySettings public SerializedProperty RTGIDenoiserRadius; public SerializedProperty RTGISecondDenoise; + // Screen Space Global Illumination + public SerializedProperty SSGIRaySteps; + public SerializedProperty SSGIFilterRadius; + // Fog public SerializedProperty VolumetricFogBudget; public SerializedProperty VolumetricFogRatio; @@ -93,6 +97,10 @@ public SerializedLightingQualitySettings(SerializedProperty root) RTGIDenoiserRadius = root.Find((GlobalLightingQualitySettings s) => s.RTGIDenoiserRadius); RTGISecondDenoise = root.Find((GlobalLightingQualitySettings s) => s.RTGISecondDenoise); + // Screen Space Global Illumination + SSGIRaySteps = root.Find((GlobalLightingQualitySettings s) => s.SSGIRaySteps); + SSGIFilterRadius = root.Find((GlobalLightingQualitySettings s) => s.SSGIFilterRadius); + // Fog VolumetricFogBudget = root.Find((GlobalLightingQualitySettings s) => s.Fog_Budget); VolumetricFogRatio = root.Find((GlobalLightingQualitySettings s) => s.Fog_DepthRatio); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs index c69410c868f..bf0ace95d5b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs @@ -173,16 +173,8 @@ internal GlobalLightingQualitySettings() // Screen Space Global Illumination /// Screen space global illumination step count for the ray marching. - [NonSerialized] public int[] SSGIRaySteps = new int[s_QualitySettingCount]; - /// Screen space global illumination's world space maximal radius. - [NonSerialized] - public float[] SSGIRadius = new float[s_QualitySettingCount]; - /// Screen space global illumination signal clamping value. - [NonSerialized] - public float[] SSGIClampValue = new float[s_QualitySettingCount]; /// Screen space global illumination's filter size. - [NonSerialized] public int[] SSGIFilterRadius = new int[s_QualitySettingCount]; // Ray Traced Ambient Occlusion