@ -33,7 +33,7 @@ namespace ArmASR
/// <summary>
/// <summary>
/// Creates a new ASR context with standard parameters that are appropriate for the current platform.
/// Creates a new ASR context with standard parameters that are appropriate for the current platform.
/// </summary>
/// </summary>
public static AsrContext CreateContext ( Vector2Int displaySize , Vector2Int maxRenderSize , AsrShaders shaders , InitializationFlags flags = 0 )
public static AsrContext CreateContext ( Variant variant , V ector2Int displaySize , Vector2Int maxRenderSize , AsrShaders shaders , InitializationFlags flags = 0 )
{
{
if ( SystemInfo . usesReversedZBuffer )
if ( SystemInfo . usesReversedZBuffer )
flags | = InitializationFlags . EnableDepthInverted ;
flags | = InitializationFlags . EnableDepthInverted ;
@ -49,6 +49,7 @@ namespace ArmASR
var contextDescription = new ContextDescription
var contextDescription = new ContextDescription
{
{
Flags = flags ,
Flags = flags ,
Variant = variant ,
DisplaySize = displaySize ,
DisplaySize = displaySize ,
MaxRenderSize = maxRenderSize ,
MaxRenderSize = maxRenderSize ,
Shaders = shaders ,
Shaders = shaders ,
@ -173,6 +174,13 @@ namespace ArmASR
#endif
#endif
}
}
public enum Variant
{
Quality , // Maintains the same image quality as the original FSR2.
Balanced , // Gives a significant improvement in both bandwidth savings and performance uplift while maintaining close image quality to the 'quality' preset.
Performance , // A more aggressive preset that will give you the highest performance with some quality sacrifices.
}
public enum QualityMode
public enum QualityMode
{
{
NativeAA = 0 ,
NativeAA = 0 ,
@ -203,6 +211,7 @@ namespace ArmASR
public struct ContextDescription
public struct ContextDescription
{
{
public InitializationFlags Flags ;
public InitializationFlags Flags ;
public Variant Variant ;
public Vector2Int MaxRenderSize ;
public Vector2Int MaxRenderSize ;
public Vector2Int DisplaySize ;
public Vector2Int DisplaySize ;
public AsrShaders Shaders ;
public AsrShaders Shaders ;