Browse Source

Unity 2020.1 compatibility testing results

master
Nico de Poel 2 years ago
parent
commit
d8a4bc3f61
  1. 14
      Assets/Scripts/Core/Fsr2.cs

14
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)); 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 public enum QualityMode
{ {
UltraQuality = 0, UltraQuality = 0,
@ -157,11 +164,11 @@ namespace FidelityFX
} }
/// <summary> /// <summary>
/// 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.
/// </summary> /// </summary>
public readonly struct RenderTargetView 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) public RenderTargetView(in RenderTargetIdentifier renderTarget, RenderTextureSubElement subElement = RenderTextureSubElement.Default, int mipLevel = 0)
{ {
@ -170,7 +177,7 @@ namespace FidelityFX
MipLevel = mipLevel; MipLevel = mipLevel;
} }
public bool IsEmpty => RenderTarget.Equals(default(RenderTargetIdentifier));
public bool IsEmpty => RenderTarget.Equals(default);
public readonly RenderTargetIdentifier RenderTarget; public readonly RenderTargetIdentifier RenderTarget;
public readonly RenderTextureSubElement SubElement; public readonly RenderTextureSubElement SubElement;
@ -213,6 +220,7 @@ namespace FidelityFX
} }
/// <summary> /// <summary>
/// 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. /// The default values for Scale, CutoffThreshold, BinaryValue and Flags were taken from the FSR2 demo project.
/// </summary> /// </summary>
public class GenerateReactiveDescription public class GenerateReactiveDescription

Loading…
Cancel
Save