From 2ccb05437a50424f3a8be814f49d2aea793bab87 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Tue, 6 Aug 2024 10:01:18 +0200 Subject: [PATCH] Removed the FP16 option from the frontends, as it's causing inexplicable issues on certain hardware/driver combinations. --- Assets/Scripts/Fsr3UpscalerImageEffect.cs | 4 ---- .../PostProcessing/Editor/PostProcessLayerEditor.cs | 3 --- .../PostProcessing/Runtime/Effects/SuperResolution.cs | 4 ---- README.md | 3 +++ 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/Fsr3UpscalerImageEffect.cs b/Assets/Scripts/Fsr3UpscalerImageEffect.cs index ba8c529..e419a90 100644 --- a/Assets/Scripts/Fsr3UpscalerImageEffect.cs +++ b/Assets/Scripts/Fsr3UpscalerImageEffect.cs @@ -43,9 +43,6 @@ namespace FidelityFX public bool performSharpenPass = true; [Tooltip("Strength of the sharpening effect.")] [Range(0, 1)] public float sharpness = 0.8f; - - [Tooltip("Allow the use of half precision compute operations, potentially improving performance if the platform supports it.")] - public bool enableFP16 = false; [Header("Exposure")] [Tooltip("Allow an exposure value to be computed internally. When set to false, either the provided exposure texture or a default exposure value will be used.")] @@ -193,7 +190,6 @@ namespace FidelityFX // Initialize FSR3 Upscaler context Fsr3Upscaler.InitializationFlags flags = 0; if (_renderCamera.allowHDR) flags |= Fsr3Upscaler.InitializationFlags.EnableHighDynamicRange; - if (enableFP16) flags |= Fsr3Upscaler.InitializationFlags.EnableFP16Usage; if (enableAutoExposure) flags |= Fsr3Upscaler.InitializationFlags.EnableAutoExposure; if (UsingDynamicResolution()) flags |= Fsr3Upscaler.InitializationFlags.EnableDynamicResolution; diff --git a/Packages/com.unity.postprocessing/PostProcessing/Editor/PostProcessLayerEditor.cs b/Packages/com.unity.postprocessing/PostProcessing/Editor/PostProcessLayerEditor.cs index 6fdf634..a2b47da 100644 --- a/Packages/com.unity.postprocessing/PostProcessing/Editor/PostProcessLayerEditor.cs +++ b/Packages/com.unity.postprocessing/PostProcessing/Editor/PostProcessLayerEditor.cs @@ -33,7 +33,6 @@ 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; @@ -93,7 +92,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_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); @@ -229,7 +227,6 @@ namespace UnityEditor.Rendering.PostProcessing 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); diff --git a/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/SuperResolution.cs b/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/SuperResolution.cs index b6639e3..516d59d 100644 --- a/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/SuperResolution.cs +++ b/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/SuperResolution.cs @@ -42,9 +42,6 @@ namespace UnityEngine.Rendering.PostProcessing [Tooltip("Strength of the sharpening effect.")] [Range(0, 1)] public float sharpness = 0.8f; - [Tooltip("Allow the use of half precision compute operations, potentially improving performance if the platform supports it.")] - public bool enableFP16 = false; - [Tooltip("Choose where to get the exposure value from. Use auto-exposure from either FSR3 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.")] @@ -210,7 +207,6 @@ namespace UnityEngine.Rendering.PostProcessing // Initialize FSR3 Upscaler context Fsr3Upscaler.InitializationFlags flags = 0; if (context.camera.allowHDR) flags |= Fsr3Upscaler.InitializationFlags.EnableHighDynamicRange; - if (enableFP16) flags |= Fsr3Upscaler.InitializationFlags.EnableFP16Usage; if (exposureSource == ExposureSource.Auto) flags |= Fsr3Upscaler.InitializationFlags.EnableAutoExposure; if (RuntimeUtilities.IsDynamicResolutionEnabled(context.camera)) flags |= Fsr3Upscaler.InitializationFlags.EnableDynamicResolution; diff --git a/README.md b/README.md index fb3694d..9897dd8 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,9 @@ Dynamic resolution works really well in combination with FSR3 Upscaler. Any run- - Using FP16 mode on Xbox with GDK October 2023 or later causes random jittering artifacts. This seems to be a shader compilation issue introduced by this GDK update. Workaround: disable FP16 on Xbox consoles. +- Using FP16 mode in D3D11 on certain older graphics cards can cause GPU driver crashes. + There appears to be an issue with how Unity compiles the shader code from the FP16 code path. + Workaround: disable FP16 mode. ## Details on implementation