diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/PostProcessLayerEditor.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/PostProcessLayerEditor.cs index e92d105..6b83e4f 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/PostProcessLayerEditor.cs +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/PostProcessLayerEditor.cs @@ -34,7 +34,6 @@ namespace UnityEditor.Rendering.PostProcessing SerializedProperty m_FsrQualityMode; SerializedProperty m_FsrPerformSharpen; SerializedProperty m_FsrSharpness; - SerializedProperty m_FsrVelocityFactor; SerializedProperty m_FsrExposureSource; SerializedProperty m_FsrExposureTexture; SerializedProperty m_FsrPreExposure; @@ -45,6 +44,7 @@ namespace UnityEditor.Rendering.PostProcessing SerializedProperty m_FsrAutoTcr; SerializedProperty m_FsrAutoTcrParams; SerializedProperty m_FsrTcrMaskTexture; + SerializedProperty m_FsrAdvancedConfig; SerializedProperty m_FogEnabled; SerializedProperty m_FogExcludeSkybox; @@ -95,7 +95,6 @@ namespace UnityEditor.Rendering.PostProcessing m_FsrQualityMode = FindProperty(x => x.superResolution.qualityMode); m_FsrPerformSharpen = FindProperty(x => x.superResolution.performSharpenPass); m_FsrSharpness = FindProperty(x => x.superResolution.sharpness); - m_FsrVelocityFactor = FindProperty(x => x.superResolution.velocityFactor); m_FsrExposureSource = FindProperty(x => x.superResolution.exposureSource); m_FsrExposureTexture = FindProperty(x => x.superResolution.exposure); m_FsrPreExposure = FindProperty(x => x.superResolution.preExposure); @@ -106,6 +105,7 @@ namespace UnityEditor.Rendering.PostProcessing m_FsrAutoTcr = FindProperty(x => x.superResolution.autoGenerateTransparencyAndComposition); m_FsrAutoTcrParams = FindProperty(x => x.superResolution.generateTransparencyAndCompositionParameters); m_FsrTcrMaskTexture = FindProperty(x => x.superResolution.transparencyAndCompositionMask); + m_FsrAdvancedConfig = FindProperty(x => x.superResolution.advancedConfiguration); m_FogEnabled = FindProperty(x => x.fog.enabled); m_FogExcludeSkybox = FindProperty(x => x.fog.excludeSkybox); @@ -232,7 +232,6 @@ namespace UnityEditor.Rendering.PostProcessing EditorGUILayout.PropertyField(m_FsrQualityMode); EditorGUILayout.PropertyField(m_FsrPerformSharpen); EditorGUILayout.PropertyField(m_FsrSharpness); - EditorGUILayout.PropertyField(m_FsrVelocityFactor); EditorGUILayout.PropertyField(m_FsrExposureSource); if (m_FsrExposureSource.intValue == (int)Upscaling.ExposureSource.Manual) EditorGUILayout.PropertyField(m_FsrExposureTexture); EditorGUILayout.PropertyField(m_FsrPreExposure); @@ -241,6 +240,7 @@ namespace UnityEditor.Rendering.PostProcessing EditorGUILayout.PropertyField(m_FsrAutoReactive.boolValue ? m_FsrAutoReactiveParams : m_FsrReactiveMaskTexture); EditorGUILayout.PropertyField(m_FsrAutoTcr); EditorGUILayout.PropertyField(m_FsrAutoTcr.boolValue ? m_FsrAutoTcrParams : m_FsrTcrMaskTexture); + EditorGUILayout.PropertyField(m_FsrAdvancedConfig); } } EditorGUI.indentLevel--; diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling.cs index 23dc820..cd780b4 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling.cs +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling.cs @@ -28,9 +28,6 @@ namespace UnityEngine.Rendering.PostProcessing [Tooltip("Strength of the sharpening effect.")] [Range(0, 1)] public float sharpness = 0.8f; - [Tooltip("Adjust the influence of motion vectors on temporal accumulation.")] - [Range(0, 1)] public float velocityFactor = 1.0f; - [Tooltip("Choose where to get the exposure value from. Use auto-exposure from either the upscaler or Unity, provide a manual exposure texture, or use a default value.")] public ExposureSource exposureSource = ExposureSource.Auto; [Tooltip("Value by which the input signal will be divided, to get back to the original signal produced by the game.")] @@ -88,7 +85,25 @@ namespace UnityEngine.Rendering.PostProcessing [Tooltip("Maximum value reactivity can reach.")] [Range(0, 1)] public float autoReactiveMax = 0.9f; } + + [Tooltip("Advanced upscaler settings")] + public AdvancedConfiguration advancedConfiguration = new AdvancedConfiguration(); + [Serializable] + public class AdvancedConfiguration + { + [Tooltip("Adjust the influence of motion vectors on temporal accumulation.")] + [Range(0, 1)] public float velocityFactor = 1.0f; + [Tooltip("Adjust how strongly reactiveness affects temporal accumulation.")] + [Range(0, 1)] public float reactivenessScale = 1.0f; + [Tooltip("Adjust how strongly shading change affects temporal accumulation.")] + [Range(0, 1)] public float shadingChangeScale = 1.0f; + [Tooltip("Adjust how strongly previous frames are weighted for temporal accumulation.")] + [Range(0, 1)] public float accumulationAddedPerFrame = 1.0f / 3.0f; + [Tooltip("Adjust the amount of temporal accumulation in disoccluded areas.")] + [Range(-1, 1)] public float minDisocclusionAccumulation = -1.0f / 3.0f; + } + public Vector2 Jitter { get; private set; } public Vector2 JitterOffset { get; private set; } public Vector2Int MaxRenderSize => _maxRenderSize; diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/FSR3Upscaler.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/FSR3Upscaler.cs index 65e3513..e08bb70 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/FSR3Upscaler.cs +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/FSR3Upscaler.cs @@ -88,7 +88,11 @@ namespace UnityEngine.Rendering.PostProcessing _dispatchDescription.CameraFar = camera.farClipPlane; _dispatchDescription.CameraFovAngleVertical = camera.fieldOfView * Mathf.Deg2Rad; _dispatchDescription.ViewSpaceToMetersFactor = 1.0f; // 1 unit is 1 meter in Unity - _dispatchDescription.VelocityFactor = config.velocityFactor; + _dispatchDescription.VelocityFactor = config.advancedConfiguration.velocityFactor; + _dispatchDescription.ReactivenessScale = config.advancedConfiguration.reactivenessScale; + _dispatchDescription.ShadingChangeScale = config.advancedConfiguration.shadingChangeScale; + _dispatchDescription.AccumulationAddedPerFrame = config.advancedConfiguration.accumulationAddedPerFrame; + _dispatchDescription.MinDisocclusionAccumulation = config.advancedConfiguration.minDisocclusionAccumulation; _dispatchDescription.Reset = config.Reset; // Set up the parameters for the optional experimental auto-TCR feature