FidelityFX Classifier

FidelityFX Classifier runtime library.

Enumerations

Name

Description

FfxClassifierInitializationFlagBits

An enumeration of bit flags used when creating a “FfxClassifierContext“. See “FfxClassifierContextDescription“. Currently, no flags exist.
FFX_CLASSIFIER_SHADOW = (1 << 0) – A bit indicating the intent is to classify shadows.
FFX_CLASSIFIER_CLASSIFY_BY_NORMALS = (1 << 1) – A bit indicating the intent is to classify by normals.
FFX_CLASSIFIER_CLASSIFY_BY_CASCADES = (1 << 2) – A bit indicating the intent is to classify by cascades.
FFX_CLASSIFIER_ENABLE_DEPTH_INVERTED = (1 << 3) – A bit indicating that the input depth buffer data provided is inverted [1..0].
FFX_CLASSIFIER_REFLECTION = (1 << 4) – A bit indicating the intent is to classify reflections.

Structs

Name

Description

FfxClassifierContext

A structure encapsulating the FidelityFX Classifier context.

FfxClassifierContextDescription

A structure encapsulating the parameters required to initialize FidelityFX Classifier.

FfxClassifierReflectionDispatchDescription

A structure encapsulating the parameters for dispatching of FidelityFX Classifier for reflections.

FfxClassifierShadowDispatchDescription

A structure encapsulating the parameters for dispatching of FidelityFX Classifier for shadows.

Functions

Return type

Description

FFX_API FfxErrorCode

Create a FidelityFX Classifier context from the parameters programmed to the “FfxClassifierContextDescription“ structure.

FFX_API FfxErrorCode

Dispatches work to the FidelityFX Classifier context for shadows.

FFX_API FfxErrorCode

Dispatches work to the FidelityFX Classifier context for reflections.

FFX_API FfxErrorCode

Destroy the FidelityFX Classifier context.

FFX_API FfxVersionNumber

Queries the effect version number.

Macros

Name

Description

FFX_CLASSIFIER_CONTEXT_COUNT 1

FidelityFX Classifier context count.

FFX_CLASSIFIER_CONTEXT_SIZE (18500)

The size of the context specified in 32bit values.

FFX_CLASSIFIER_VERSION_MAJOR (1)

FidelityFX Classifier major version.

FFX_CLASSIFIER_VERSION_MINOR (3)

FidelityFX Classifier minor version.

FFX_CLASSIFIER_VERSION_PATCH (0)

FidelityFX Classifier patch version.

Detailed description

FidelityFX Classifier runtime library.

Global functions

ffxClassifierContextCreate

Copied!

FFX_API  FfxErrorCode  ffxClassifierContextCreate (
    FfxClassifierContext * pContext,
    const FfxClassifierContextDescription * pContextDescription
)

Create a FidelityFX Classifier context from the parameters programmed to the FfxClassifierContextDescription structure.

The context structure is the main object used to interact with the Classifier API, and is responsible for the management of the internal resources used by the Classifier. When this API is called, multiple calls will be made via the pointers contained in the backendInterface structure. This backend will attempt to retrieve the device capabilities, and create the internal resources, and pipelines required by the Classifier to function. Depending on the precise configuration used when creating the FfxClassifierContext a different set of resources and pipelines might be requested via the callback functions.

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

Parameters:

pContext

A pointer to a FfxClassifierContext structure to populate.

pContextDescription

A pointer to a FfxClassifierContextDescription structure.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_CODE_NULL_POINTER

The operation failed because either context or contextDescription was NULL.

FFX_ERROR_INCOMPLETE_INTERFACE

The operation failed because the FfxClassifierContextDescription.callbacks was not fully specified.

FFX_ERROR_BACKEND_API_ERROR

The operation failed because of an error returned from the backend.


ffxClassifierContextShadowDispatch

Copied!

FFX_API  FfxErrorCode  ffxClassifierContextShadowDispatch (
    FfxClassifierContext * pContext,
    const FfxClassifierShadowDispatchDescription * pDispatchDescription
)

Dispatches work to the FidelityFX Classifier context for shadows.

Parameters:

pContext

A pointer to a FfxClassifierContext structure.

pDispatchDescription

A pointer to a FfxClassifierShadowDispatchDescription structure.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_CODE_NULL_POINTER

The operation failed because either context or dispatchDescription was NULL.

FFX_ERROR_BACKEND_API_ERROR

The operation failed because of an error returned from the backend.


ffxClassifierContextReflectionDispatch

Copied!

FFX_API  FfxErrorCode  ffxClassifierContextReflectionDispatch (
    FfxClassifierContext * pContext,
    const FfxClassifierReflectionDispatchDescription * pDispatchDescription
)

Dispatches work to the FidelityFX Classifier context for reflections.

Parameters:

pContext

A pointer to a FfxClassifierContext structure.

pDispatchDescription

A pointer to a FfxClassifierReflectionDispatchDescription structure.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_CODE_NULL_POINTER

The operation failed because either context or dispatchDescription was NULL.

FFX_ERROR_BACKEND_API_ERROR

The operation failed because of an error returned from the backend.


ffxClassifierContextDestroy

Copied!

FFX_API  FfxErrorCode  ffxClassifierContextDestroy (FfxClassifierContext * pContext)

Destroy the FidelityFX Classifier context.

Parameters:

pContext

A pointer to a FfxClassifierContext structure to destroy.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_CODE_NULL_POINTER

The operation failed because context was NULL.


ffxClassifierGetEffectVersion

Copied!

FFX_API  FfxVersionNumber  ffxClassifierGetEffectVersion ()

Queries the effect version number.

Returns:

The SDK version the effect was built with.


Macros

FFX_CLASSIFIER_CONTEXT_COUNT

Copied!

#define FFX_CLASSIFIER_CONTEXT_COUNT 1

FidelityFX Classifier context count.

Defines the number of internal effect contexts required by Classifier


FFX_CLASSIFIER_CONTEXT_SIZE

Copied!

#define FFX_CLASSIFIER_CONTEXT_SIZE (18500)

The size of the context specified in 32bit values.


FFX_CLASSIFIER_VERSION_MAJOR

Copied!

#define FFX_CLASSIFIER_VERSION_MAJOR (1)

FidelityFX Classifier major version.


FFX_CLASSIFIER_VERSION_MINOR

Copied!

#define FFX_CLASSIFIER_VERSION_MINOR (3)

FidelityFX Classifier minor version.


FFX_CLASSIFIER_VERSION_PATCH

Copied!

#define FFX_CLASSIFIER_VERSION_PATCH (0)

FidelityFX Classifier patch version.