Browse Source

Moved generate reactive parameters up in the source file, so it's close to where it's being used.

It felt very weird having it dangle off the bottom of the source file.
mac-autoexp
Nico de Poel 3 years ago
parent
commit
eade3d40ce
  1. 18
      Assets/Scripts/Fsr2Controller.cs

18
Assets/Scripts/Fsr2Controller.cs

@ -26,6 +26,15 @@ namespace FidelityFX
[SerializeField] private bool generateReactiveMask = false;
[SerializeField] private GenerateReactiveParameters generateReactiveParameters = new GenerateReactiveParameters();
[System.Serializable]
public class GenerateReactiveParameters
{
[Range(0, 2)] public float scale = 1.0f;
[Range(0, 1)] public float cutoffThreshold = 0.2f;
[Range(0, 1)] public float binaryValue = 0.9f;
public Fsr2.GenerateReactiveFlags flags = Fsr2.GenerateReactiveFlags.ApplyTonemap | Fsr2.GenerateReactiveFlags.ApplyThreshold | Fsr2.GenerateReactiveFlags.UseComponentsMax;
}
private Fsr2Context _context;
private Vector2Int _renderSize;
private Vector2Int _displaySize;
@ -255,14 +264,5 @@ namespace FidelityFX
// Shut up the Unity warning about not writing to the destination texture
Graphics.SetRenderTarget(dest);
}
[System.Serializable]
public class GenerateReactiveParameters
{
[Range(0, 2)] public float scale = 1.0f;
[Range(0, 1)] public float cutoffThreshold = 0.2f;
[Range(0, 1)] public float binaryValue = 0.9f;
public Fsr2.GenerateReactiveFlags flags = Fsr2.GenerateReactiveFlags.ApplyTonemap | Fsr2.GenerateReactiveFlags.ApplyThreshold | Fsr2.GenerateReactiveFlags.UseComponentsMax;
}
}
}
Loading…
Cancel
Save