FidelityFX Brixelizer GI

FidelityFX Brixelizer GI library.

Enumerations

Name

Description

FfxBrixelizerGIDebugMode

An enumeration of which output mode to be used by Brixelizer GI debug visualization. See “FfxBrixelizerGIDebugDescription“.
FFX_BRIXELIZER_GI_DEBUG_MODE_RADIANCE_CACHE – Draw the radiance cache.
FFX_BRIXELIZER_GI_DEBUG_MODE_IRRADIANCE_CACHE – Draw the irradiance cache.

FfxBrixelizerGIFlags

An enumeration of flag bits used when creating an “FfxBrixelizerGIContext“. See “FfxBrixelizerGIContextDescription“.
FFX_BRIXELIZER_GI_FLAG_DEPTH_INVERTED = (1 << 0) – Indicates input resources were generated with inverted depth.
FFX_BRIXELIZER_GI_FLAG_DISABLE_SPECULAR = (1 << 1) – Disable specular GI.
FFX_BRIXELIZER_GI_FLAG_DISABLE_DENOISER = (1 << 2) – Disable denoising. Only allowed at native resolution.

FfxBrixelizerGIInternalResolution

An enumeration of the quality modes supported by FidelityFX Brixelizer GI.
FFX_BRIXELIZER_GI_INTERNAL_RESOLUTION_NATIVE – Output GI at native resolution.
FFX_BRIXELIZER_GI_INTERNAL_RESOLUTION_75_PERCENT – Output GI at 75% of native resolution.
FFX_BRIXELIZER_GI_INTERNAL_RESOLUTION_50_PERCENT – Output GI at 50% of native resolution.
FFX_BRIXELIZER_GI_INTERNAL_RESOLUTION_25_PERCENT – Output GI at 25% of native resolution.

FfxBrixelizerGIPass

An enumeration of all the passes which constitute the Brixelizer algorithm.
FFX_BRIXELIZER_GI_PASS_BLUR_X
FFX_BRIXELIZER_GI_PASS_BLUR_Y
FFX_BRIXELIZER_GI_PASS_CLEAR_CACHE
FFX_BRIXELIZER_GI_PASS_EMIT_IRRADIANCE_CACHE
FFX_BRIXELIZER_GI_PASS_EMIT_PRIMARY_RAY_RADIANCE
FFX_BRIXELIZER_GI_PASS_FILL_SCREEN_PROBES
FFX_BRIXELIZER_GI_PASS_INTERPOLATE_SCREEN_PROBES
FFX_BRIXELIZER_GI_PASS_PREPARE_CLEAR_CACHE
FFX_BRIXELIZER_GI_PASS_PROJECT_SCREEN_PROBES
FFX_BRIXELIZER_GI_PASS_PROPAGATE_SH
FFX_BRIXELIZER_GI_PASS_REPROJECT_GI
FFX_BRIXELIZER_GI_PASS_REPROJECT_SCREEN_PROBES
FFX_BRIXELIZER_GI_PASS_SPAWN_SCREEN_PROBES
FFX_BRIXELIZER_GI_PASS_SPECULAR_PRE_TRACE
FFX_BRIXELIZER_GI_PASS_SPECULAR_TRACE
FFX_BRIXELIZER_GI_PASS_DEBUG_VISUALIZATION
FFX_BRIXELIZER_GI_PASS_GENERATE_DISOCCLUSION_MASK
FFX_BRIXELIZER_GI_PASS_DOWNSAMPLE
FFX_BRIXELIZER_GI_PASS_UPSAMPLE
FFX_BRIXELIZER_GI_PASS_COUNT – The number of passes performed by Brixelizer GI.

Structs

Name

Description

FfxBrixelizerGIContext

A structure encapsulating the FidelityFX Brixelizer GI context.

FfxBrixelizerGIContextDescription

A structure encapsulating the parameters used for creating an “FfxBrixelizerGIContext“.

FfxBrixelizerGIDebugDescription

A structure encapsulating the parameters for drawing a debug visualization.

FfxBrixelizerGIDispatchDescription

A structure encapsulating the parameters used for computing a dispatch by the Brixelizer GI context.

Functions

Return type

Description

size_t

Get the size in bytes needed for an “FfxBrixelizerGIContext“ struct. Note that this function is provided for consistency, and the size of the “FfxBrixelizerGIContext“ is a known compile time value which can be obtained using “sizeof(FfxBrixelizerGIContext)“.

FFX_API FfxErrorCode

Create a FidelityFX Brixelizer GI context from the parameters specified to the “FfxBrixelizerGIContextDescription“ struct.

FFX_API FfxErrorCode

Destroy the FidelityFX Brixelizer GI context.

FFX_API FfxErrorCode

Perform an update of Brixelizer GI, recording GPU commands to a command list.

FFX_API FfxErrorCode

Make a debug visualization from the “FfxBrixelizerGIContext“.

FFX_API FfxVersionNumber

Queries the effect version number.

Macros

Name

Description

FFX_BRIXELIZER_GI_CONTEXT_COUNT 1

FidelityFX Brixelizer GI context count.

FFX_BRIXELIZER_GI_CONTEXT_SIZE (210000)

The size of the context specified in 32bit values.

FFX_BRIXELIZER_GI_VERSION_MAJOR (1)

FidelityFX Brixelizer GI major version.

FFX_BRIXELIZER_GI_VERSION_MINOR (0)

FidelityFX Brixelizer GI minor version.

FFX_BRIXELIZER_GI_VERSION_PATCH (0)

FidelityFX Brixelizer GI patch version.

Detailed description

FidelityFX Brixelizer GI library.

Global functions

ffxBrixelizerGIGetContextSize

Copied!

size_t ffxBrixelizerGIGetContextSize ()

Get the size in bytes needed for an FfxBrixelizerGIContext struct. Note that this function is provided for consistency, and the size of the FfxBrixelizerGIContext is a known compile time value which can be obtained using sizeof(FfxBrixelizerGIContext).

Returns:

The size in bytes of an FfxBrixelizerGIContext struct.


ffxBrixelizerGIContextCreate

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerGIContextCreate (
    FfxBrixelizerGIContext * pContext,
    const FfxBrixelizerGIContextDescription * pContextDescription
)

Create a FidelityFX Brixelizer GI context from the parameters specified to the FfxBrixelizerGIContextDescription struct.

The context structure is the main object used to interact with the Brixelizer GI API, and is responsible for the management of the internal resources used by the Brixelizer GI 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 Brixelizer GI.

Depending on the parameters passed in via the *pContextDescription* a different set of resources and pipelines may be requested by the callback functions.

The FfxBrixelizerGIContext should be destroyed when use of it is completed. To destroy the context you should call ffxBrixelizerGIContextDestroy.

Parameters:

pContext

A pointer to a FfxBrixelizerGIContext to populate.

pContextDescription

A pointer to a FfxBrixelizerGIContextDescription specifying the parameters for context creation.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because either pContext or pContextDescription was NULL.

FFX_ERROR_INCOMPLETE_INTERFACE

The operation failed because pContextDescription->backendInterface was not fully specified.

FFX_ERROR_BACKEND_API_ERROR

The operation failed because of an error from the backend.


ffxBrixelizerGIContextDestroy

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerGIContextDestroy (FfxBrixelizerGIContext * pContext)

Destroy the FidelityFX Brixelizer GI context.

Parameters:

pContext

A pointer to a FfxBrixelizerGIContext structure to destroy.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The pContext pointer provided was NULL.


ffxBrixelizerGIContextDispatch

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerGIContextDispatch (
    FfxBrixelizerGIContext * pContext,
    const FfxBrixelizerGIDispatchDescription * pDispatchDescription,
    FfxCommandList  pCommandList
)

Perform an update of Brixelizer GI, recording GPU commands to a command list.

Parameters:

context

An FfxBrixelizerGIContext containing the Brixelizer GI context.

pDispatchDescription

A pointer to a FfxBrixelizerGIDispatchDescription describing the dispatch to compute.

pCommandList

An FfxCommandList to write GPU commands to.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerGIContextDebugVisualization

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerGIContextDebugVisualization (
    FfxBrixelizerGIContext * pContext,
    const FfxBrixelizerGIDebugDescription * pDebugDescription,
    FfxCommandList  pCommandList
)

Make a debug visualization from the FfxBrixelizerGIContext.

Parameters:

context

An FfxBrixelizerGIContext containing the Brixelizer GI context.

pDebugDescription

A pointer to a FfxBrixelizerGIDebugDescription describing the debug visualization to draw.

pCommandList

An FfxCommandList to write GPU commands to.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerGIGetEffectVersion

Copied!

FFX_API  FfxVersionNumber  ffxBrixelizerGIGetEffectVersion ()

Queries the effect version number.

Returns:

The SDK version the effect was built with.


Macros

FFX_BRIXELIZER_GI_CONTEXT_COUNT

Copied!

#define FFX_BRIXELIZER_GI_CONTEXT_COUNT 1

FidelityFX Brixelizer GI context count.

Defines the number of internal effect contexts required by Brixelizer


FFX_BRIXELIZER_GI_CONTEXT_SIZE

Copied!

#define FFX_BRIXELIZER_GI_CONTEXT_SIZE (210000)

The size of the context specified in 32bit values.


FFX_BRIXELIZER_GI_VERSION_MAJOR

Copied!

#define FFX_BRIXELIZER_GI_VERSION_MAJOR (1)

FidelityFX Brixelizer GI major version.


FFX_BRIXELIZER_GI_VERSION_MINOR

Copied!

#define FFX_BRIXELIZER_GI_VERSION_MINOR (0)

FidelityFX Brixelizer GI minor version.


FFX_BRIXELIZER_GI_VERSION_PATCH

Copied!

#define FFX_BRIXELIZER_GI_VERSION_PATCH (0)

FidelityFX Brixelizer GI patch version.