From 6bf1add17a6bc4f341b7c449809b5317f301bb73 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Wed, 5 Jun 2024 16:36:49 +0200 Subject: [PATCH] Only include FSR2 wrapper plugin on Windows, where the original native plugin actually exists --- .../RenderPipeline/RenderPass/Upscalers/FSR2WrapperUpscaler.cs | 2 ++ .../RenderPipeline/RenderPass/Upscalers/UpscalerPlugin.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Upscalers/FSR2WrapperUpscaler.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Upscalers/FSR2WrapperUpscaler.cs index 6243751f..049fcb66 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Upscalers/FSR2WrapperUpscaler.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Upscalers/FSR2WrapperUpscaler.cs @@ -1,5 +1,6 @@ using System; +#if UNITY_STANDALONE_WIN namespace UnityEngine.Rendering.HighDefinition.AMD.FSR2Wrapper { /// @@ -128,3 +129,4 @@ namespace UnityEngine.Rendering.HighDefinition.AMD.FSR2Wrapper } } } +#endif // UNITY_STANDALONE_WIN diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Upscalers/UpscalerPlugin.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Upscalers/UpscalerPlugin.cs index 08f44c9b..2e8cecbe 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Upscalers/UpscalerPlugin.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Upscalers/UpscalerPlugin.cs @@ -10,7 +10,9 @@ namespace UnityEngine.Rendering.HighDefinition.AMD private static readonly List AvailablePlugins = new() { new FSR3.FSR3UpscalerPlugin(), +#if UNITY_STANDALONE_WIN new FSR2Wrapper.FSR2WrapperUpscaler(), +#endif }; internal static UpscalerPlugin ActivePlugin = AvailablePlugins[0];