Skip to content

FidelityFX Cas

Navigation: SDKEffect Components

FidelityFX Cas

FidelityFX Contrast Adaptive Sharpening runtime library.

Defines

FFX_CAS_VERSION_MAJOR

#define FFX_CAS_VERSION_MAJOR (1)

Contrast Adaptive Sharpening major version.

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 38, column 9)

FFX_CAS_VERSION_MINOR

#define FFX_CAS_VERSION_MINOR (2)

Contrast Adaptive Sharpening minor version.

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 43, column 9)

FFX_CAS_VERSION_PATCH

#define FFX_CAS_VERSION_PATCH (0)

Contrast Adaptive Sharpening patch version.

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 48, column 9)

FFX_CAS_CONTEXT_COUNT

#define FFX_CAS_CONTEXT_COUNT 1

FidelityFX CAS context count.

Defines the number of internal effect contexts required by CAS

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 55, column 9)

FFX_CAS_CONTEXT_SIZE

#define FFX_CAS_CONTEXT_SIZE (9206)

The size of the context specified in 32bit values.

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 60, column 9)

Functions

ffxCasContextCreate

FFX_API FfxErrorCode ffxCasContextCreate(FfxCasContext *pContext, const FfxCasContextDescription *pContextDescription)

Create a FidelityFX CAS context from the parameters programmed to the FfxCasContextDescription structure.

The context structure is the main object used to interact with the CAS, and is responsible for the management of the internal resources used by the CAS algorithm. When this API is called, multiple calls will be made via the pointers contained in the callbacks structure. These callbacks will attempt to retreive the device capabilities, , and pipelines required by CAS frame-to-frame function. Depending on configuration used when creating the FfxCasContext a different set of pipelines might be requested via the callback functions.

The FfxCasContext should be destroyed when use of it is completed, typically when an application is unloaded or CAS is disabled by a user. To destroy the CAS context you should call ffxCasContextDestroy.

Parameters:

  • pContext (FfxCasContext *) – [out] A pointer to a FfxCasContext structure to populate.
  • pContextDescription (const FfxCasContextDescription *) – [in] A pointer to a FfxCasContextDescription structure.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 172, column 22)

ffxCasContextDispatch

FFX_API FfxErrorCode ffxCasContextDispatch(FfxCasContext *pContext, const FfxCasDispatchDescription *pDispatchDescription)

Parameters:

  • pContext (FfxCasContext *) – [out] A pointer to a FfxCasContext structure to populate.
  • pDispatchDescription (const FfxCasDispatchDescription *) – [in] A pointer to a FfxCasDispatchDescription structure.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 185, column 22)

ffxCasContextDestroy

FFX_API FfxErrorCode ffxCasContextDestroy(FfxCasContext *pContext)

Destroy the FidelityFX CAS context.

Parameters:

  • pContext (FfxCasContext *) – [out] A pointer to a FfxCasContext structure to destroy.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 197, column 22)

ffxCasGetEffectVersion

FFX_API FfxVersionNumber ffxCasGetEffectVersion()

Queries the effect version number.

Returns: The SDK version the effect was built with.

Returns: FFX_API FfxVersionNumber

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 205, column 26)

Enumerations

FfxCasPass

enum FfxCasPass

An enumeration of all the passes which constitute the CAS algorithm.

CAS has only one pass. For a more comprehensive description of this pass, please refer to the CAS reference documentation.

Values:

FFX_CAS_PASS_SHARPEN

FFX_CAS_PASS_SHARPEN = 0

A pass which sharpens only or upscales the color buffer.

FFX_CAS_PASS_COUNT

The number of passes performed by CAS.

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 72, column 1)

FfxCasColorSpaceConversion

enum FfxCasColorSpaceConversion

An enumeration of color space conversions used when creating a FfxCASContext. See FfxCASContextDescription.

Values:

FFX_CAS_COLOR_SPACE_LINEAR

FFX_CAS_COLOR_SPACE_LINEAR = 0

Linear color space, will do nothing.

FFX_CAS_COLOR_SPACE_GAMMA20

FFX_CAS_COLOR_SPACE_GAMMA20 = 1

Convert gamma 2.0 to linear for input and linear to gamma 2.0 for output.

FFX_CAS_COLOR_SPACE_GAMMA22

FFX_CAS_COLOR_SPACE_GAMMA22 = 2

Convert gamma 2.2 to linear for input and linear to gamma 2.2 for output.

FFX_CAS_COLOR_SPACE_SRGB_OUTPUT

FFX_CAS_COLOR_SPACE_SRGB_OUTPUT = 3

Only do sRGB conversion for output (input conversion will be done automatically).

FFX_CAS_COLOR_SPACE_SRGB_INPUT_OUTPUT

FFX_CAS_COLOR_SPACE_SRGB_INPUT_OUTPUT = 4

Convert sRGB to linear for input and linear to sRGB for output.

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 83, column 1)

FfxCasInitializationFlagBits

enum FfxCasInitializationFlagBits

An enumeration of bit flags used when creating a FfxCASContext. See FfxCASContextDescription.

Values:

FFX_CAS_SHARPEN_ONLY

FFX_CAS_SHARPEN_ONLY = (1 <<0)

A bit indicating if we sharpen only.

Source: sdk/include/FidelityFX/host/ffx_cas.h (line 96, column 1)

Dependencies: FfxCasContext, FfxCasContextDescription, FfxCasDispatchDescription