FidelityFX Denoiser

FidelityFX Denoiser runtime library.

Enumerations

Name

Description

FfxDenoiserInitializationFlagBits

An enumeration of bit flags used when creating a “FfxDenoiserContext“. See “FfxDenoiserContextDescription“.
FFX_DENOISER_SHADOWS = (1 << 0) – A bit indicating that the denoiser is used for denoising shadows.
FFX_DENOISER_REFLECTIONS = (1 << 1) – A bit indicating that the denoiser is used for denoising reflections.
FFX_DENOISER_ENABLE_DEPTH_INVERTED = (1 << 2) – A bit indicating that the input depth buffer data provided is inverted [1..0].

Structs

Name

Description

FfxDenoiserContext

A structure encapsulating the FidelityFX denoiser context.

FfxDenoiserContextDescription

A structure encapsulating the parameters required to initialize FidelityFX Denoiser.

FfxDenoiserReflectionsDispatchDescription

A structure encapsulating the parameters for dispatching of FidelityFX Denoiser.

FfxDenoiserShadowsDispatchDescription

A structure encapsulating the parameters for dispatching of FidelityFX Denoiser.

Functions

Return type

Description

FFX_API FfxErrorCode

Create a FidelityFX Denoiser context from the parameters programmed to the “FfxDenoiserContextDescription“ structure.

FFX_API FfxErrorCode

Dispatches work to the FidelityFX Denoiser context.

FFX_API FfxErrorCode

Dispatches work to the FidelityFX Denoiser context.

FFX_API FfxErrorCode

Destroy the FidelityFX Denoiser context.

FFX_API FfxVersionNumber

Queries the effect version number.

Macros

Name

Description

FFX_DENOISER_CONTEXT_COUNT 1

FidelityFX denoiser context count.

FFX_DENOISER_VERSION_MAJOR (1)

FidelityFX Denoiser major version.

FFX_DENOISER_VERSION_MINOR (3)

FidelityFX Denoiser minor version.

FFX_DENOISER_VERSION_PATCH (0)

FidelityFX Denoiser patch version.

Detailed description

FidelityFX Denoiser runtime library.

Global functions

ffxDenoiserContextCreate

Copied!

FFX_API  FfxErrorCode  ffxDenoiserContextCreate (
    FfxDenoiserContext * pContext,
    const FfxDenoiserContextDescription * pContextDescription
)

Create a FidelityFX Denoiser context from the parameters programmed to the FfxDenoiserContextDescription structure.

The context structure is the main object used to interact with the Denoiser API, and is responsible for the management of the internal resources used by the Denoiser algorithm. 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 Denoiser to function. Depending on the precise configuration used when creating the FfxDenoiserContext a different set of resources and pipelines might be requested via the callback functions.

The FfxDenoiserContext should be destroyed when use of it is completed, typically when an application is unloaded or shadow denoising is disabled by a user. To destroy the Denoiser context you should call ffxDenoiserContextDestroy.

Parameters:

context

A pointer to a FfxDenoiserContext structure to populate.

contextDescription

A pointer to a FfxDenoiserContextDescription 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 FfxDenoiserContextDescription.callbacks was not fully specified.

FFX_ERROR_BACKEND_API_ERROR

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


ffxDenoiserContextDispatchShadows

Copied!

FFX_API  FfxErrorCode  ffxDenoiserContextDispatchShadows (
    FfxDenoiserContext * context,
    const FfxDenoiserShadowsDispatchDescription * dispatchDescription
)

Dispatches work to the FidelityFX Denoiser context.

Parameters:

context

A pointer to a FfxDenoiserContext structure to populate.

dispatchDescription

A pointer to a FfxDenoiserShadowsDispatchDescription 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.


ffxDenoiserContextDispatchReflections

Copied!

FFX_API  FfxErrorCode  ffxDenoiserContextDispatchReflections (
    FfxDenoiserContext * context,
    const FfxDenoiserReflectionsDispatchDescription * dispatchDescription
)

Dispatches work to the FidelityFX Denoiser context.

Parameters:

context

A pointer to a FfxDenoiserContext structure to populate.

dispatchDescription

A pointer to a FfxDenoiserReflectionsDispatchDescription 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.


ffxDenoiserContextDestroy

Copied!

FFX_API  FfxErrorCode  ffxDenoiserContextDestroy (FfxDenoiserContext * context)

Destroy the FidelityFX Denoiser context.

Parameters:

context

A pointer to a FfxDenoiserContext structure to destroy.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_CODE_NULL_POINTER

The operation failed because either context was NULL.


ffxDenoiserGetEffectVersion

Copied!

FFX_API  FfxVersionNumber  ffxDenoiserGetEffectVersion ()

Queries the effect version number.

Returns:

The SDK version the effect was built with.


Macros

FFX_DENOISER_CONTEXT_COUNT

Copied!

#define FFX_DENOISER_CONTEXT_COUNT 1

FidelityFX denoiser context count.

Defines the number of internal effect contexts required by the denoiser


FFX_DENOISER_VERSION_MAJOR

Copied!

#define FFX_DENOISER_VERSION_MAJOR (1)

FidelityFX Denoiser major version.


FFX_DENOISER_VERSION_MINOR

Copied!

#define FFX_DENOISER_VERSION_MINOR (3)

FidelityFX Denoiser minor version.


FFX_DENOISER_VERSION_PATCH

Copied!

#define FFX_DENOISER_VERSION_PATCH (0)

FidelityFX Denoiser patch version.