FidelityFX Blur

FidelityFX Blur runtime library.

Enumerations

Name

Description

FfxBlurFloatPrecision

Enum to specify whether to initialize the FP32 or FP16 bit permutation of the blur shader(s). Use this when setting the FfxBlurContextDescription::floatPrecision parameter prior to calling ffxBlurContextCreate.
FFX_BLUR_FLOAT_PRECISION_32BIT = 0
FFX_BLUR_FLOAT_PRECISION_16BIT = 1
FFX_BLUR_FLOAT_PRECISION_COUNT = 2

FfxBlurKernelSize

Enum to specify the size of the blur kernel. Use logical OR to enable multiple kernels when setting the FfxBlurContextDescription::kernelSizes parameter prior to calling ffxBlurContextCreate.
FFX_BLUR_KERNEL_SIZE_3x3 = (1 << 0)
FFX_BLUR_KERNEL_SIZE_5x5 = (1 << 1)
FFX_BLUR_KERNEL_SIZE_7x7 = (1 << 2)
FFX_BLUR_KERNEL_SIZE_9x9 = (1 << 3)
FFX_BLUR_KERNEL_SIZE_11x11 = (1 << 4)
FFX_BLUR_KERNEL_SIZE_13x13 = (1 << 5)
FFX_BLUR_KERNEL_SIZE_15x15 = (1 << 6)
FFX_BLUR_KERNEL_SIZE_17x17 = (1 << 7)
FFX_BLUR_KERNEL_SIZE_19x19 = (1 << 8)
FFX_BLUR_KERNEL_SIZE_21x21 = (1 << 9)

FfxBlurPass

Enum to specify which blur pass (currently only one).
FFX_BLUR_PASS_BLUR = 0 – A pass which which blurs the input.
FFX_BLUR_PASS_COUNT – The number of passes in the Blur effect.

Structs

Name

Description

FfxBlurContext

FfxBlurContext must be created via ffxBlurContextCreate to use the FFX Blur effect.

FfxBlurContextDescription

FfxBlurContextDescription struct is used to create/initialize an FfxBlurContext.

FfxBlurDispatchDescription

FfxBlurDispatchDescription struct defines configuration of a blur dispatch (see ffxBlurContextDispatch).

Functions

Return type

Description

FFX_API FfxErrorCode

ffxBlurContextCreate ( FfxBlurContext * pContext, const FfxBlurContextDescription * pContextDescription )
Create and initialize the FfxBlurContext.

FFX_API FfxErrorCode

Destroy and free resources associated with the FfxBlurContext.

FFX_API FfxErrorCode

ffxBlurContextDispatch ( FfxBlurContext * pContext, const FfxBlurDispatchDescription * pDispatchDescription )
Create and initialize the FfxBlurContext.

FFX_API FfxVersionNumber

Queries the effect version number.

Macros

Name

Description

FFX_BLUR_CONTEXT_COUNT 1

FidelityFX Blur context count.

FFX_BLUR_CONTEXT_SIZE (1024)

The size of the context specified in uint32_t units.

FFX_BLUR_KERNEL_PERMUTATIONS_ALL ((1 << FFX_BLUR_KERNEL_PERMUTATION_COUNT) – 1)

Use this macro for FfxBlurContextDescription::sigmaPermutations to enable all sigma permutations.

FFX_BLUR_KERNEL_SIZE_ALL ((1 << FFX_BLUR_KERNEL_SIZE_COUNT) – 1)

Use this macro for FfxBlurContextDescription::kernelSizes to enable all kernel sizes.

FFX_BLUR_VERSION_MAJOR (1)

FidelityFX Blur major version.

FFX_BLUR_VERSION_MINOR (1)

FidelityFX Blur minor version.

FFX_BLUR_VERSION_PATCH (0)

FidelityFX Blur patch version.

Detailed description

FidelityFX Blur runtime library.

Global functions

ffxBlurContextCreate

Copied!

FFX_API  FfxErrorCode  ffxBlurContextCreate (
    FfxBlurContext * pContext,
    const FfxBlurContextDescription * pContextDescription
)

Create and initialize the FfxBlurContext.

Parameters:

pContext

The FfxBlurContext to create and initialize.

pContextDescription

The initialization configuration parameters.


ffxBlurContextDestroy

Copied!

FFX_API  FfxErrorCode  ffxBlurContextDestroy (FfxBlurContext * pContext)

Destroy and free resources associated with the FfxBlurContext.

Parameters:

pContext

The FfxBlurContext to destroy.


ffxBlurContextDispatch

Copied!

FFX_API  FfxErrorCode  ffxBlurContextDispatch (
    FfxBlurContext * pContext,
    const FfxBlurDispatchDescription * pDispatchDescription
)

Create and initialize the FfxBlurContext.

Parameters:

pContext

The FfxBlurContext to use for the dispatch.

pDispatchDescription

The dispatch configuration parameters (see FfxBlurDispatchDescription).


ffxBlurGetEffectVersion

Copied!

FFX_API  FfxVersionNumber  ffxBlurGetEffectVersion ()

Queries the effect version number.

Returns:

The SDK version the effect was built with.


Macros

FFX_BLUR_CONTEXT_COUNT

Copied!

#define FFX_BLUR_CONTEXT_COUNT 1

FidelityFX Blur context count.

Defines the number of internal effect contexts required by Blur


FFX_BLUR_CONTEXT_SIZE

Copied!

#define FFX_BLUR_CONTEXT_SIZE (1024)

The size of the context specified in uint32_t units.


FFX_BLUR_KERNEL_PERMUTATIONS_ALL

Copied!

#define FFX_BLUR_KERNEL_PERMUTATIONS_ALL ((1 << FFX_BLUR_KERNEL_PERMUTATION_COUNT) - 1)

Use this macro for FfxBlurContextDescription::sigmaPermutations to enable all sigma permutations.


FFX_BLUR_KERNEL_SIZE_ALL

Copied!

#define FFX_BLUR_KERNEL_SIZE_ALL ((1 << FFX_BLUR_KERNEL_SIZE_COUNT) - 1)

Use this macro for FfxBlurContextDescription::kernelSizes to enable all kernel sizes.


FFX_BLUR_VERSION_MAJOR

Copied!

#define FFX_BLUR_VERSION_MAJOR (1)

FidelityFX Blur major version.


FFX_BLUR_VERSION_MINOR

Copied!

#define FFX_BLUR_VERSION_MINOR (1)

FidelityFX Blur minor version.


FFX_BLUR_VERSION_PATCH

Copied!

#define FFX_BLUR_VERSION_PATCH (0)

FidelityFX Blur patch version.