Browse Source

Moved FSR2 and FSR3 classes into their own sub-namespaces. This fixes an ambiguity when compiling for Unity 2020.x and is also more future-proof with an eye on porting over more FidelityFX technologies.

fsr3.1
Nico de Poel 2 years ago
parent
commit
20a5dc2e5b
  1. 1
      Assets/Scripts/Fsr3UpscalerImageEffect.cs
  2. 1
      Assets/Scripts/Fsr3UpscalerImageEffectHelper.cs
  3. 2
      Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2.cs
  4. 2
      Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2Assets.cs
  5. 2
      Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2Callbacks.cs
  6. 2
      Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2Context.cs
  7. 2
      Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2Pass.cs
  8. 2
      Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2Resources.cs
  9. 2
      Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2ShaderIDs.cs
  10. 2
      Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3ShaderIDs.cs
  11. 2
      Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3Upscaler.cs
  12. 2
      Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3UpscalerAssets.cs
  13. 2
      Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3UpscalerCallbacks.cs
  14. 2
      Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3UpscalerContext.cs
  15. 2
      Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3UpscalerPass.cs
  16. 2
      Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3UpscalerResources.cs
  17. 3
      com.unity.postprocessing/PostProcessing/Runtime/Effects/SuperResolution.cs
  18. 2
      com.unity.postprocessing/PostProcessing/Runtime/PostProcessResources.cs
  19. 1
      com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Fsr3Upscaler/Fsr3UpscalerPlugin.cs

1
Assets/Scripts/Fsr3UpscalerImageEffect.cs

@ -22,6 +22,7 @@ using System;
using UnityEngine; using UnityEngine;
using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering;
using UnityEngine.Rendering; using UnityEngine.Rendering;
using FidelityFX.FSR3;
namespace FidelityFX namespace FidelityFX
{ {

1
Assets/Scripts/Fsr3UpscalerImageEffectHelper.cs

@ -20,6 +20,7 @@
using System.Collections; using System.Collections;
using UnityEngine; using UnityEngine;
using FidelityFX.FSR3;
namespace FidelityFX namespace FidelityFX
{ {

2
Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2.cs

@ -23,7 +23,7 @@ using System.Runtime.InteropServices;
using UnityEngine; using UnityEngine;
using UnityEngine.Rendering; using UnityEngine.Rendering;
namespace FidelityFX
namespace FidelityFX.FSR2
{ {
/// <summary> /// <summary>
/// A collection of helper functions and data structures required by the FSR2 process. /// A collection of helper functions and data structures required by the FSR2 process.

2
Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2Assets.cs

@ -20,7 +20,7 @@
using UnityEngine; using UnityEngine;
namespace FidelityFX
namespace FidelityFX.FSR2
{ {
/// <summary> /// <summary>
/// Scriptable object containing all shader resources required by FidelityFX Super Resolution 2 (FSR2). /// Scriptable object containing all shader resources required by FidelityFX Super Resolution 2 (FSR2).

2
Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2Callbacks.cs

@ -20,7 +20,7 @@
using UnityEngine; using UnityEngine;
namespace FidelityFX
namespace FidelityFX.FSR2
{ {
/// <summary> /// <summary>
/// A collection of callbacks required by the FSR2 process. /// A collection of callbacks required by the FSR2 process.

2
Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2Context.cs

@ -23,7 +23,7 @@ using System.Runtime.InteropServices;
using UnityEngine; using UnityEngine;
using UnityEngine.Rendering; using UnityEngine.Rendering;
namespace FidelityFX
namespace FidelityFX.FSR2
{ {
/// <summary> /// <summary>
/// This class loosely matches the FfxFsr2Context struct from the original FSR2 codebase. /// This class loosely matches the FfxFsr2Context struct from the original FSR2 codebase.

2
Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2Pass.cs

@ -24,7 +24,7 @@ using UnityEngine;
using UnityEngine.Profiling; using UnityEngine.Profiling;
using UnityEngine.Rendering; using UnityEngine.Rendering;
namespace FidelityFX
namespace FidelityFX.FSR2
{ {
/// <summary> /// <summary>
/// Base class for all of the compute passes that make up the FSR2 process. /// Base class for all of the compute passes that make up the FSR2 process.

2
Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2Resources.cs

@ -23,7 +23,7 @@ using UnityEngine;
using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering;
using UnityEngine.Rendering; using UnityEngine.Rendering;
namespace FidelityFX
namespace FidelityFX.FSR2
{ {
/// <summary> /// <summary>
/// Helper class for bundling and managing persistent resources required by the FSR2 process. /// Helper class for bundling and managing persistent resources required by the FSR2 process.

2
Packages/fidelityfx.fsr/Runtime/FSR2/Fsr2ShaderIDs.cs

@ -20,7 +20,7 @@
using UnityEngine; using UnityEngine;
namespace FidelityFX
namespace FidelityFX.FSR2
{ {
public static class Fsr2ShaderIDs public static class Fsr2ShaderIDs
{ {

2
Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3ShaderIDs.cs

@ -20,7 +20,7 @@
using UnityEngine; using UnityEngine;
namespace FidelityFX
namespace FidelityFX.FSR3
{ {
public static class Fsr3ShaderIDs public static class Fsr3ShaderIDs
{ {

2
Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3Upscaler.cs

@ -23,7 +23,7 @@ using System.Runtime.InteropServices;
using UnityEngine; using UnityEngine;
using UnityEngine.Rendering; using UnityEngine.Rendering;
namespace FidelityFX
namespace FidelityFX.FSR3
{ {
/// <summary> /// <summary>
/// A collection of helper functions and data structures required by the FSR3 Upscaler process. /// A collection of helper functions and data structures required by the FSR3 Upscaler process.

2
Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3UpscalerAssets.cs

@ -21,7 +21,7 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization; using UnityEngine.Serialization;
namespace FidelityFX
namespace FidelityFX.FSR3
{ {
/// <summary> /// <summary>
/// Scriptable object containing all shader resources required by FidelityFX Super Resolution 3 (FSR3) Upscaler. /// Scriptable object containing all shader resources required by FidelityFX Super Resolution 3 (FSR3) Upscaler.

2
Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3UpscalerCallbacks.cs

@ -20,7 +20,7 @@
using UnityEngine; using UnityEngine;
namespace FidelityFX
namespace FidelityFX.FSR3
{ {
/// <summary> /// <summary>
/// A collection of callbacks required by the FSR3 Upscaler process. /// A collection of callbacks required by the FSR3 Upscaler process.

2
Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3UpscalerContext.cs

@ -23,7 +23,7 @@ using System.Runtime.InteropServices;
using UnityEngine; using UnityEngine;
using UnityEngine.Rendering; using UnityEngine.Rendering;
namespace FidelityFX
namespace FidelityFX.FSR3
{ {
/// <summary> /// <summary>
/// This class loosely matches the FfxFsr3UpscalerContext struct from the original FSR3 codebase. /// This class loosely matches the FfxFsr3UpscalerContext struct from the original FSR3 codebase.

2
Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3UpscalerPass.cs

@ -24,7 +24,7 @@ using UnityEngine;
using UnityEngine.Profiling; using UnityEngine.Profiling;
using UnityEngine.Rendering; using UnityEngine.Rendering;
namespace FidelityFX
namespace FidelityFX.FSR3
{ {
/// <summary> /// <summary>
/// Base class for all of the compute passes that make up the FSR3 Upscaler process. /// Base class for all of the compute passes that make up the FSR3 Upscaler process.

2
Packages/fidelityfx.fsr/Runtime/FSR3/Fsr3UpscalerResources.cs

@ -23,7 +23,7 @@ using UnityEngine;
using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering;
using UnityEngine.Rendering; using UnityEngine.Rendering;
namespace FidelityFX
namespace FidelityFX.FSR3
{ {
/// <summary> /// <summary>
/// Helper class for bundling and managing persistent resources required by the FSR3 Upscaler process. /// Helper class for bundling and managing persistent resources required by the FSR3 Upscaler process.

3
com.unity.postprocessing/PostProcessing/Runtime/Effects/SuperResolution.cs

@ -1,4 +1,4 @@
// Copyright (c) 2023 Nico de Poel
// Copyright (c) 2024 Nico de Poel
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
@ -24,6 +24,7 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering;
using FidelityFX; using FidelityFX;
using FidelityFX.FSR3;
namespace UnityEngine.Rendering.PostProcessing namespace UnityEngine.Rendering.PostProcessing
{ {

2
com.unity.postprocessing/PostProcessing/Runtime/PostProcessResources.cs

@ -1,5 +1,5 @@
using System; using System;
using FidelityFX;
using FidelityFX.FSR3;
namespace UnityEngine.Rendering.PostProcessing namespace UnityEngine.Rendering.PostProcessing
{ {

1
com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Fsr3Upscaler/Fsr3UpscalerPlugin.cs

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using FidelityFX; using FidelityFX;
using FidelityFX.FSR3;
// We use an old C# trick here to override the UnityEngine.AMD namespace and force FSR2Pass to use code from this namespace instead. // We use an old C# trick here to override the UnityEngine.AMD namespace and force FSR2Pass to use code from this namespace instead.
// By exactly mimicking the interface of the AMDUnityPlugin module, we can replace Unity's implementation of FSR2 with one of our own. // By exactly mimicking the interface of the AMDUnityPlugin module, we can replace Unity's implementation of FSR2 with one of our own.

Loading…
Cancel
Save