Browse Source

Added a workaround for the missing SetBufferData method in Unity 2020.x, which was still named SetComputeBufferData there.

hdrp
Nico de Poel 2 years ago
parent
commit
564bd71f5a
  1. 7
      Assets/Scripts/Core/Fsr2.cs

7
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,

Loading…
Cancel
Save