From 6eeb3f1f46438293401ff49f687509dad567eee2 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Tue, 30 May 2023 18:51:20 +0200 Subject: [PATCH] Added inspector fields for remaining properties --- .../Editor/PostProcessLayerEditor.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) 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 1d98030..a07893b 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 @@ -33,11 +33,16 @@ namespace UnityEditor.Rendering.PostProcessing SerializedProperty m_FsrQualityMode; SerializedProperty m_FsrPerformSharpen; SerializedProperty m_FsrSharpness; + SerializedProperty m_FsrEnableFP16; SerializedProperty m_FsrExposureSource; + SerializedProperty m_FsrExposureTexture; + SerializedProperty m_FsrPreExposure; SerializedProperty m_FsrAutoReactive; SerializedProperty m_FsrAutoReactiveParams; + SerializedProperty m_FsrReactiveMaskTexture; SerializedProperty m_FsrAutoTcr; SerializedProperty m_FsrAutoTcrParams; + SerializedProperty m_FsrTcrMaskTexture; SerializedProperty m_FogEnabled; SerializedProperty m_FogExcludeSkybox; @@ -87,11 +92,16 @@ 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_FsrEnableFP16 = FindProperty(x => x.superResolution.enableFP16); m_FsrExposureSource = FindProperty(x => x.superResolution.exposureSource); + m_FsrExposureTexture = FindProperty(x => x.superResolution.exposure); + m_FsrPreExposure = FindProperty(x => x.superResolution.preExposure); m_FsrAutoReactive = FindProperty(x => x.superResolution.autoGenerateReactiveMask); m_FsrAutoReactiveParams = FindProperty(x => x.superResolution.generateReactiveParameters); + m_FsrReactiveMaskTexture = FindProperty(x => x.superResolution.reactiveMask); m_FsrAutoTcr = FindProperty(x => x.superResolution.autoGenerateTransparencyAndComposition); m_FsrAutoTcrParams = FindProperty(x => x.superResolution.generateTransparencyAndCompositionParameters); + m_FsrTcrMaskTexture = FindProperty(x => x.superResolution.transparencyAndCompositionMask); m_FogEnabled = FindProperty(x => x.fog.enabled); m_FogExcludeSkybox = FindProperty(x => x.fog.excludeSkybox); @@ -214,15 +224,17 @@ namespace UnityEditor.Rendering.PostProcessing } else if (m_AntialiasingMode.intValue == (int)PostProcessLayer.Antialiasing.SuperResolution) { - // TODO: add remaining FSR2 options EditorGUILayout.PropertyField(m_FsrQualityMode); EditorGUILayout.PropertyField(m_FsrPerformSharpen); EditorGUILayout.PropertyField(m_FsrSharpness); + EditorGUILayout.PropertyField(m_FsrEnableFP16); EditorGUILayout.PropertyField(m_FsrExposureSource); + if (m_FsrExposureSource.intValue == (int)SuperResolution.ExposureSource.Manual) EditorGUILayout.PropertyField(m_FsrExposureTexture); + EditorGUILayout.PropertyField(m_FsrPreExposure); EditorGUILayout.PropertyField(m_FsrAutoReactive); - if (m_FsrAutoReactive.boolValue) EditorGUILayout.PropertyField(m_FsrAutoReactiveParams); + EditorGUILayout.PropertyField(m_FsrAutoReactive.boolValue ? m_FsrAutoReactiveParams : m_FsrReactiveMaskTexture); EditorGUILayout.PropertyField(m_FsrAutoTcr); - if (m_FsrAutoTcr.boolValue) EditorGUILayout.PropertyField(m_FsrAutoTcrParams); + EditorGUILayout.PropertyField(m_FsrAutoTcr.boolValue ? m_FsrAutoTcrParams : m_FsrTcrMaskTexture); } } EditorGUI.indentLevel--;