|
|
|
@ -395,7 +395,7 @@ namespace FidelityFX |
|
|
|
|
|
|
|
private void SetupRcasConstants(Fsr2.DispatchDescription dispatchParams) |
|
|
|
{ |
|
|
|
int sharpnessIndex = Mathf.RoundToInt(Mathf.Clamp01(dispatchParams.Sharpness) * (RcasConfigs.Count - 1)); |
|
|
|
int sharpnessIndex = Mathf.RoundToInt(Mathf.Clamp01(dispatchParams.Sharpness) * (RcasConfigs.Length - 1)); |
|
|
|
RcasConsts = RcasConfigs[sharpnessIndex]; |
|
|
|
} |
|
|
|
|
|
|
|
@ -532,7 +532,7 @@ namespace FidelityFX |
|
|
|
/// The FSR2 C++ codebase uses floats bitwise converted to ints to pass sharpness parameters to the RCAS shader.
|
|
|
|
/// This is not possible in C# without enabling unsafe code compilation, so to avoid that we instead use a table of precomputed values.
|
|
|
|
/// </summary>
|
|
|
|
private static readonly List<Fsr2.RcasConstants> RcasConfigs = new List<Fsr2.RcasConstants>() |
|
|
|
private static readonly Fsr2.RcasConstants[] RcasConfigs = new [] |
|
|
|
{ |
|
|
|
new Fsr2.RcasConstants(1048576000u, 872428544u), |
|
|
|
new Fsr2.RcasConstants(1049178080u, 877212745u), |
|
|
|
|