diff --git a/Assets/Scripts/Core/Fsr2.cs b/Assets/Scripts/Core/Fsr2.cs
index 89a8c42..9866358 100644
--- a/Assets/Scripts/Core/Fsr2.cs
+++ b/Assets/Scripts/Core/Fsr2.cs
@@ -125,6 +125,13 @@ namespace FidelityFX
return Mathf.Abs(value) < Mathf.Epsilon ? 1.0f : Mathf.Sin(Mathf.PI * value) / (Mathf.PI * value) * (Mathf.Sin(0.5f * Mathf.PI * value) / (0.5f * Mathf.PI * value));
}
+#if !UNITY_2021_1_OR_NEWER
+ internal static void SetBufferData(this CommandBuffer commandBuffer, ComputeBuffer computeBuffer, Array data)
+ {
+ commandBuffer.SetComputeBufferData(computeBuffer, data);
+ }
+#endif
+
public enum QualityMode
{
UltraQuality = 0,
@@ -157,11 +164,11 @@ namespace FidelityFX
}
///
- /// A structure wrapping all of the necessary information to bind a specific buffer or attachment of a render target to a compute shader.
+ /// An immutable structure wrapping all of the necessary information to bind a specific buffer or attachment of a render target to a compute shader.
///
public readonly struct RenderTargetView
{
- public static readonly RenderTargetView Empty = new RenderTargetView(default(RenderTargetIdentifier));
+ public static readonly RenderTargetView Empty = new RenderTargetView(default);
public RenderTargetView(in RenderTargetIdentifier renderTarget, RenderTextureSubElement subElement = RenderTextureSubElement.Default, int mipLevel = 0)
{
@@ -170,7 +177,7 @@ namespace FidelityFX
MipLevel = mipLevel;
}
- public bool IsEmpty => RenderTarget.Equals(default(RenderTargetIdentifier));
+ public bool IsEmpty => RenderTarget.Equals(default);
public readonly RenderTargetIdentifier RenderTarget;
public readonly RenderTextureSubElement SubElement;
@@ -213,6 +220,7 @@ namespace FidelityFX
}
///
+ /// A structure encapsulating the parameters for automatic generation of a reactive mask.
/// The default values for Scale, CutoffThreshold, BinaryValue and Flags were taken from the FSR2 demo project.
///
public class GenerateReactiveDescription