FidelityFX Cas
FidelityFX Contrast Adaptive Sharpening runtime library.
Enumerations
Name |
Description |
---|---|
FfxCasColorSpaceConversion |
An enumeration of color space conversions used when creating a “FfxCASContext“. See “FfxCASContextDescription“.
FFX_CAS_COLOR_SPACE_LINEAR = 0 – Linear color space, will do nothing.
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 = 2 – Convert gamma 2.2 to linear for input and linear to gamma 2.2 for 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 = 4 – Convert sRGB to linear for input and linear to sRGB for output.
|
FfxCasInitializationFlagBits |
An enumeration of bit flags used when creating a “FfxCASContext“. See “FfxCASContextDescription“.
FFX_CAS_SHARPEN_ONLY = (1 << 0) – A bit indicating if we sharpen only.
|
FfxCasPass |
An enumeration of all the passes which constitute the CAS algorithm.
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.
|
Structs
Name |
Description |
---|---|
A structure encapsulating the FidelityFX CAS context.
|
|
A structure encapsulating the parameters required to initialize FidelityFX CAS.
|
|
A structure encapsulating the parameters for dispatching the various passes of FidelityFX CAS.
|
Functions
Return type |
Description |
---|---|
ffxCasContextCreate ( FfxCasContext * pContext, const FfxCasContextDescription * pContextDescription )
Create a FidelityFX CAS context from the parameters programmed to the “FfxCasContextDescription“ structure.
|
|
ffxCasContextDispatch ( FfxCasContext * pContext, const FfxCasDispatchDescription * pDispatchDescription )
..
|
|
ffxCasContextDestroy (FfxCasContext * pContext)
Destroy the FidelityFX CAS context.
|
|
Queries the effect version number.
|
Macros
Name |
Description |
---|---|
FidelityFX CAS context count.
|
|
FFX_CAS_CONTEXT_SIZE (9206) |
The size of the context specified in 32bit values.
|
Contrast Adaptive Sharpening major version.
|
|
Contrast Adaptive Sharpening minor version.
|
|
Contrast Adaptive Sharpening patch version.
|
Detailed description
FidelityFX Contrast Adaptive Sharpening runtime library.
Global 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 |
A pointer to a |
pContextDescription |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_CODE_NULL_POINTER |
The operation failed because either |
FFX_ERROR_INCOMPLETE_INTERFACE |
The operation failed because the |
FFX_ERROR_BACKEND_API_ERROR |
The operation failed because of an error returned from the backend. |
ffxCasContextDispatch
FFX_API FfxErrorCode ffxCasContextDispatch (
FfxCasContext * pContext,
const FfxCasDispatchDescription * pDispatchDescription
)
Parameters:
pContext |
A pointer to a |
pDispatchDescription |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_CODE_NULL_POINTER |
The operation failed because either |
FFX_ERROR_BACKEND_API_ERROR |
The operation failed because of an error returned from the backend. |
ffxCasContextDestroy
FFX_API FfxErrorCode ffxCasContextDestroy (FfxCasContext * pContext)
Destroy the FidelityFX CAS context.
Parameters:
pContext |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_CODE_NULL_POINTER |
The operation failed because either |
ffxCasGetEffectVersion
FFX_API FfxVersionNumber ffxCasGetEffectVersion ()
Queries the effect version number.
Returns:
The SDK version the effect was built with.
Macros
FFX_CAS_CONTEXT_COUNT
FidelityFX CAS context count.
Defines the number of internal effect contexts required by CAS
FFX_CAS_CONTEXT_SIZE
The size of the context specified in 32bit values.
FFX_CAS_VERSION_MAJOR
Contrast Adaptive Sharpening major version.
FFX_CAS_VERSION_MINOR
Contrast Adaptive Sharpening minor version.
FFX_CAS_VERSION_PATCH
Contrast Adaptive Sharpening patch version.