diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/ScreenSpaceAmbientOcclusionEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/ScreenSpaceAmbientOcclusionEditor.cs index b90e591d..0ef7f798 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/ScreenSpaceAmbientOcclusionEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/ScreenSpaceAmbientOcclusionEditor.cs @@ -17,6 +17,7 @@ namespace UnityEditor.Rendering.HighDefinition SerializedDataParameter m_Radius; SerializedDataParameter m_FullResolution; SerializedDataParameter m_MaximumRadiusInPixels; + SerializedDataParameter m_ShadowMultiplier; SerializedDataParameter m_DirectLightingStrength; SerializedDataParameter m_SpatialBilateralAggressiveness; @@ -54,6 +55,7 @@ namespace UnityEditor.Rendering.HighDefinition m_Radius = Unpack(o.Find(x => x.radius)); m_FullResolution = Unpack(o.Find("m_FullResolution")); m_MaximumRadiusInPixels = Unpack(o.Find("m_MaximumRadiusInPixels")); + m_ShadowMultiplier = Unpack(o.Find(x => x.shadowMultiplier)); m_TemporalAccumulation = Unpack(o.Find(x => x.temporalAccumulation)); m_DirectionCount = Unpack(o.Find("m_DirectionCount")); @@ -84,6 +86,7 @@ namespace UnityEditor.Rendering.HighDefinition public static readonly GUIContent useCacao = EditorGUIUtility.TrTextContent("Use FidelityFX CACAO", "Enable FidelityFX CACAO ambient occlusion technique."); public static readonly GUIContent intesity = EditorGUIUtility.TrTextContent("Intensity", "Controls the strength of the ambient occlusion effect. Increase this value to produce darker areas."); public static readonly GUIContent directLightingStrenght = EditorGUIUtility.TrTextContent("Direct Lighting Strength", "Controls how much the ambient light affects occlusion."); + public static readonly GUIContent shadowMultiplier = EditorGUIUtility.TrTextContent("Shadow Multiplier", "Controls the multiplier for the shadow values."); public static readonly GUIContent layerMask = EditorGUIUtility.TrTextContent("Layer Mask", "Layer mask used to include the objects for ambient occlusion."); static public readonly GUIContent specularOcclusion = EditorGUIUtility.TrTextContent("Specular Occlusion", "Controls the influence of the ambient occlusion on the specular occlusion. Increase this value to reduce the amount of specular leaking in occluded areas."); public static readonly GUIContent maxRayLength = EditorGUIUtility.TrTextContent("Max Ray Length", "Controls the maximal length of ambient occlusion rays. The higher this value is, the more expensive ray traced ambient occlusion is."); @@ -164,6 +167,7 @@ namespace UnityEditor.Rendering.HighDefinition else // TODO: add separate settings for CACAO { PropertyField(m_Radius, Styles.radius); + PropertyField(m_ShadowMultiplier, Styles.shadowMultiplier); base.OnInspectorGUI(); // Quality Setting diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/HDRenderPipeline.AmbientOcclusion.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/HDRenderPipeline.AmbientOcclusion.cs index d0b693c8..37784d37 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/HDRenderPipeline.AmbientOcclusion.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/HDRenderPipeline.AmbientOcclusion.cs @@ -167,6 +167,7 @@ namespace UnityEngine.Rendering.HighDefinition }; cacaoParameters.settings.radius = settings.radius.value; + cacaoParameters.settings.shadowMultiplier = settings.shadowMultiplier.value; cacaoParameters.settings.shadowPower = settings.intensity.value; result = RenderCacao(renderGraph, cacaoParameters, depthBuffer, normalBuffer); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceAmbientOcclusion.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceAmbientOcclusion.cs index 51100ca1..f9746275 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceAmbientOcclusion.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceAmbientOcclusion.cs @@ -36,6 +36,8 @@ namespace UnityEngine.Rendering.HighDefinition /// public ClampedFloatParameter radius = new ClampedFloatParameter(2.0f, 0.25f, 5.0f); + public ClampedFloatParameter shadowMultiplier = new ClampedFloatParameter(1.0f, 0.0f, 5.0f); + /// /// Moving this factor closer to 0 will increase the amount of accepted samples during temporal accumulation, increasing the ghosting, but reducing the temporal noise. ///