FidelityFX Brixelizer

FidelityFX Brixelizer library.

Typedefs

Type

Description

typedef uint32_t

An ID value for an instance created with Brixelizer.

Enumerations

Name

Description

FfxBrixelizerCascadeDebugAABB

Flags used for specifying debug drawing of AABBs.
FFX_BRIXELIZER_CASCADE_DEBUG_AABB_NONE
FFX_BRIXELIZER_CASCADE_DEBUG_AABB_BOUNDING_BOX
FFX_BRIXELIZER_CASCADE_DEBUG_AABB_AABB_TREE

FfxBrixelizerCascadeFlag

Flags used for cascade creation. A cascade may be specified as having static geometry, dynamic geometry, or both by combining these flags.
FFX_BRIXELIZER_CASCADE_STATIC = (1 << 0)
FFX_BRIXELIZER_CASCADE_DYNAMIC = (1 << 1)

FfxBrixelizerCascadeUpdateFlags

An enumeration of flags which can be specified for different options when doing a cascade update.
FFX_BRIXELIZER_CASCADE_UPDATE_FLAG_NONE = FfxUInt32(0) – No flags.
FFX_BRIXELIZER_CASCADE_UPDATE_FLAG_RESET = FfxUInt32(1) << FfxUInt32(0) – Reset the cascade. This clears and frees all bricks currently in the cascade ready to rebuild the cascade completely.

FfxBrixelizerContextFlags

Flags for options for Brixelizer context creation.
FFX_BRIXELIZER_CONTEXT_FLAG_DEBUG_CONTEXT_READBACK_BUFFERS = (1 << 0) – Create a context with context readback buffers enabled. Needed to use “ffxBrixelizerContextGetDebugCounters“.
FFX_BRIXELIZER_CONTEXT_FLAG_DEBUG_CASCADE_READBACK_BUFFERS = (1 << 1) – Create a context with cascade readback buffers enabled. Needed to use “ffxBrixelizerContextGetCascadeCounters“.
FFX_BRIXELIZER_CONTEXT_FLAG_DEBUG_AABBS = (1 << 2) – Create a context with debug AABBs enabled.
FFX_BRIXELIZER_CONTEXT_FLAG_ALL_DEBUG = FFX_BRIXELIZER_CONTEXT_FLAG_DEBUG_CONTEXT_READBACK_BUFFERS | FFX_BRIXELIZER_CONTEXT_FLAG_DEBUG_CASCADE_READBACK_BUFFERS | FFX_BRIXELIZER_CONTEXT_FLAG_DEBUG_AABBS – Create a context with all debugging features enabled.

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.

FfxBrixelizerInstanceFlags

Flags used for specifying instance properties.
FFX_BRIXELIZER_INSTANCE_FLAG_NONE = 0 – No instance flags set.
FFX_BRIXELIZER_INSTANCE_FLAG_DYNAMIC = 1 << 0 – This flag is set for any instance which should be added to the dynamic cascade. Indicates that this instance will be resubmitted every frame.

FfxBrixelizerPass

An enumeration of all the passes which constitute the Brixelizer algorithm.
FFX_BRIXELIZER_PASS_CONTEXT_CLEAR_COUNTERS
FFX_BRIXELIZER_PASS_CONTEXT_COLLECT_CLEAR_BRICKS
FFX_BRIXELIZER_PASS_CONTEXT_PREPARE_CLEAR_BRICKS
FFX_BRIXELIZER_PASS_CONTEXT_CLEAR_BRICK
FFX_BRIXELIZER_PASS_CONTEXT_COLLECT_DIRTY_BRICKS
FFX_BRIXELIZER_PASS_CONTEXT_PREPARE_EIKONAL_ARGS
FFX_BRIXELIZER_PASS_CONTEXT_EIKONAL
FFX_BRIXELIZER_PASS_CONTEXT_MERGE_CASCADES
FFX_BRIXELIZER_PASS_CONTEXT_PREPARE_MERGE_BRICKS_ARGS
FFX_BRIXELIZER_PASS_CONTEXT_MERGE_BRICKS
FFX_BRIXELIZER_PASS_CASCADE_CLEAR_BUILD_COUNTERS
FFX_BRIXELIZER_PASS_CASCADE_RESET_CASCADE
FFX_BRIXELIZER_PASS_CASCADE_SCROLL_CASCADE
FFX_BRIXELIZER_PASS_CASCADE_CLEAR_REF_COUNTERS
FFX_BRIXELIZER_PASS_CASCADE_CLEAR_JOB_COUNTER
FFX_BRIXELIZER_PASS_CASCADE_INVALIDATE_JOB_AREAS
FFX_BRIXELIZER_PASS_CASCADE_COARSE_CULLING
FFX_BRIXELIZER_PASS_CASCADE_SCAN_JOBS
FFX_BRIXELIZER_PASS_CASCADE_VOXELIZE
FFX_BRIXELIZER_PASS_CASCADE_SCAN_REFERENCES
FFX_BRIXELIZER_PASS_CASCADE_COMPACT_REFERENCES
FFX_BRIXELIZER_PASS_CASCADE_CLEAR_BRICK_STORAGE
FFX_BRIXELIZER_PASS_CASCADE_EMIT_SDF
FFX_BRIXELIZER_PASS_CASCADE_COMPRESS_BRICK
FFX_BRIXELIZER_PASS_CASCADE_INITIALIZE_CASCADE
FFX_BRIXELIZER_PASS_CASCADE_MARK_UNINITIALIZED
FFX_BRIXELIZER_PASS_CASCADE_BUILD_TREE_AABB
FFX_BRIXELIZER_PASS_CASCADE_FREE_CASCADE
FFX_BRIXELIZER_PASS_DEBUG_VISUALIZATION
FFX_BRIXELIZER_PASS_DEBUG_INSTANCE_AABBS
FFX_BRIXELIZER_PASS_DEBUG_AABB_TREE
FFX_BRIXELIZER_PASS_COUNT – The number of passes performed by Brixelizer.

FfxBrixelizerPopulateDebugAABBsFlags

Flags used for setting which AABBs to draw in a debug visualization of Brixelizer.
FFX_BRIXELIZER_POPULATE_AABBS_NONE = 0 – Draw no AABBs.
FFX_BRIXELIZER_POPULATE_AABBS_STATIC_INSTANCES = 1 << 0 – Draw AABBs for all static instances.
FFX_BRIXELIZER_POPULATE_AABBS_DYNAMIC_INSTANCES = 1 << 1 – Draw AABBs for all dynamic instances.
FFX_BRIXELIZER_POPULATE_AABBS_INSTANCES = FFX_BRIXELIZER_POPULATE_AABBS_STATIC_INSTANCES | FFX_BRIXELIZER_POPULATE_AABBS_DYNAMIC_INSTANCES – Draw AABBs for all instances.
FFX_BRIXELIZER_POPULATE_AABBS_CASCADE_AABBS = 1 << 2 – Draw AABBs for all cascades.

FfxBrixelizerRawInstanceFlags

Flags used for creating Brixelizer instances.
FFX_BRIXELIZER_RAW_INSTANCE_FLAG_NONE = 0u
FFX_BRIXELIZER_RAW_INSTANCE_FLAG_USE_INDEXLESS_QUAD_LIST = 1u << 1u

FfxBrixelizerRawJobFlags

Flags used for creating Brixelizer jobs. Determines whether a job is a submission of geometry or invalidating an area described by an AABB.
FFX_BRIXELIZER_RAW_JOB_FLAG_NONE = 0u
FFX_BRIXELIZER_RAW_JOB_FLAG_INVALIDATE = 1u << 2u

FfxBrixelizerTraceDebugModes

An enumeration of the different possible debug outputs for the Brixelizer debug visualization.
FFX_BRIXELIZER_TRACE_DEBUG_MODE_DISTANCE = 0 – Display a visualisation of the distance to hit, with closer hits in blue and further hits in green.
FFX_BRIXELIZER_TRACE_DEBUG_MODE_UVW = 1 – Display the UVW coordinates of hits.
FFX_BRIXELIZER_TRACE_DEBUG_MODE_ITERATIONS = 2 – Display a heatmap visualizing number of iterations in the scene.
FFX_BRIXELIZER_TRACE_DEBUG_MODE_GRAD = 3 – Display the normals at hits.
FFX_BRIXELIZER_TRACE_DEBUG_MODE_BRICK_ID = 4 – Display each brick in its own color.
FFX_BRIXELIZER_TRACE_DEBUG_MODE_CASCADE_ID = 5 – Display each cascade in itw own color.

Structs

Name

Description

FfxBrixelizerAABB

A structure representing an axis aligned bounding box for use with Brixelizer.

FfxBrixelizerBakedUpdateDescription

A structure generated by Brixelizer from an “FfxBrixelizerUpdateDescription“ structure used for storing parameters necessary for an update with the underlying raw Brixelizer API.

FfxBrixelizerBufferDescription

A structure encapsulating the parameters necessary to register a buffer with the Brixelizer API.

FfxBrixelizerCascadeDescription

A structure encapsulating the parameters for cascade creation.

FfxBrixelizerCascadeInfo

A structure of parameters describing a cascade. This structure is primarily for Brixelizer internal use.

FfxBrixelizerCascadeResources

A structure representing the external resources needed for a Brixelizer cascade.

FfxBrixelizerCascadeStats

A structure containing the statistics for a Brixelizer cascade readable after an update of the Brixelizer API.

FfxBrixelizerContext

A structure encapsulating the FidelityFX Brixelizer context.

FfxBrixelizerContextDescription

A structure encapsulating the parameters for creating a Brixelizer context.

FfxBrixelizerContextInfo

A structure of parameters describing the Brixelizer context. This structure is primarily for Brixelizer internal use.

FfxBrixelizerContextStats

A structure containing the statistics for a Brixelizer context readable after an update of the Brixelizer API.

FfxBrixelizerDebugCounters

A structure containing all the counters used by the Brixelizer context. These can be read back from the context after processing each update for analysis. “brickCount“ gives the total number of bricks allocated. “dirtyBricks“ gives the total number of bricks requiring an eikonal pass for completion. “freeBricks“ gives the total number of free bricks. This is the maximum number of bricks which can be allocated within a frame. “clearBricks“ gives the total number of bricks to be cleared in a frame. Bricks are cleared by having all distance values reset to 1. “mergeBricks“ gives the total number of bricks to be merged in a frame. “numDebugAABBs“ gives the total number of debug AABBs requested to be drawn in a debug visualization.

FfxBrixelizerDebugVisualizationDescription

A structure encapsulating the parameters for drawing a debug visualization.

FfxBrixelizerHit

A structure encapsulating minimal data associated with a ray SDF hit.

FfxBrixelizerHitRaw

A structure encapsulating all data associated with a ray SDF hit.

FfxBrixelizerHitWithNormal

A structure encapsulating the distance to a ray hit and the normal of the surface hit.

FfxBrixelizerInstanceDescription

A structure encapsulating the parameters necessary to create an instance with Brixelizer.

FfxBrixelizerRawCascadeDescription

A structure encapsulating the parameters for creating a Brixelizer cascade.

FfxBrixelizerRawCascadeUpdateDescription

A structure encapsulating the parameters for updating a Brixelizer cascade.

FfxBrixelizerRawContext

A structure encapsulating the FidelityFX Brixelizer context.

FfxBrixelizerRawContextDescription

A structure encapsulating the parameters for creating a Brixelizer context.

FfxBrixelizerRawInstanceDescription

A structure encapsulating the parameters for an instance to be added to a Brixelizer context.

FfxBrixelizerRawJobDescription

A structure describing a Brixelizer job.

FfxBrixelizerRayDesc

A structure encapsulating the parameters for a ray to be marched using Brixelizer.

FfxBrixelizerResources

A structure representing all external resources for use with Brixelizer.

FfxBrixelizerScratchCounters

A structure containing the counters used by the Brixelizer context for each cascade update. This can be readback and used for analysis after each update. The following members contain useful information for analysing Brixelizer resource usage.

FfxBrixelizerStats

A structure containing the statistics readable after an update of the Brixelizer API.

FfxBrixelizerUpdateDescription

A structure encapsulating the parameters used for computing an update by the Brixelizer context.

Functions

Return type

Description

FfxBoolean

This function is used for running a ray query against the Brixelizer SDF acceleration structure. The “raw” version returns the data immediately accessible from the SDF structure generated by a hit.

FfxFloat32x3

Calculate a normal from a hit described by an “FfxBrixelizerHitRaw“ structure.

FfxBoolean

This function is used for running a ray query against the Brixelizer SDF acceleration structure. This version simply returns the distance to a hit if a hit is encountered.

FfxBoolean

This function is used for running a ray query against the Brixelizer SDF acceleration structure. This version returns the distance to a hit and a normal to the SDF geometry at a hit location when a hit is encountered.

size_t

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

FFX_API FfxErrorCode

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

FFX_API FfxErrorCode

Delete the Brixelizer context associated with the “FfxBrixelizerContext“ struct.

FFX_API FfxErrorCode

Fill in an “FfxBrixelizerContextInfo“ struct for necessary for updating a constant buffer for use by Brixelizer when ray marching.

FFX_API FfxErrorCode

Build an “FfxBrixelizerBakedUpdateDescription“ struct from an “FfxBrixelizerUpdateDescription“ struct for use in doing a Brixelizer update.

FFX_API FfxErrorCode

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

FFX_API FfxErrorCode

ffxBrixelizerRegisterBuffers ( FfxBrixelizerContext * context, const FfxBrixelizerBufferDescription * bufferDescs, uint32_t numBufferDescs )
Register a vertex or index buffer to use with Brixelizer.

FFX_API FfxErrorCode

ffxBrixelizerUnregisterBuffers ( FfxBrixelizerContext * context, const uint32_t* indices, uint32_t numIndices )
Unregister a previously registered vertex or index buffer.

FFX_API FfxErrorCode

Create a static instance for a Brixelizer context.

FFX_API FfxErrorCode

ffxBrixelizerDeleteInstances ( FfxBrixelizerContext * context, const FfxBrixelizerInstanceID * instanceIDs, uint32_t numInstanceIDs )
Delete a static instance from a Brixelizer context.

FFX_API FfxErrorCode

Get a pointer to the underlying Brixelizer raw context from a Brixelizer context.

size_t

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

FFX_API FfxErrorCode

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

FFX_API FfxErrorCode

Destroy the FidelityFX Brixelizer context.

FFX_API FfxErrorCode

Get an “FfxBrixelizerContextInfo“ structure with the details for “context“. This call is intended to be used to fill in a constant buffer necessary for making ray queries.

FFX_API FfxErrorCode

Create a cascade for use with Brixelizer.

FFX_API FfxErrorCode

Destroy a cascade previously created with “ffxBrixelizerContextCreateCascade“.

FFX_API FfxErrorCode

Reset a cascade previously created with “ffxBrixelizerContextCreateCascade“.

FFX_API FfxErrorCode

Begin constructing GPU commands for updating SDF acceleration structures with Brixelizer. Must be called between calls to “ffxBrixelizerContextBegin“ and “ffxBrixelizerContextEnd“.

FFX_API FfxErrorCode

End construcring GPU commands for updating the SDF acceleration structures with Brixelizer.

FFX_API FfxErrorCode

Record GPU commands to a “FfxCommandList“ for updating acceleration structures with Brixelizer.

FFX_API FfxErrorCode

Get the size in bytes needed from a “FfxResource“ to be used as a scratch buffer in a cascade update.

FFX_API FfxErrorCode

Update a cascade in a Brixelizer context.

FFX_API FfxErrorCode

ffxBrixelizerRawContextMergeCascades ( FfxBrixelizerRawContext * context, uint32_t src_cascade_A_idx, uint32_t src_cascade_B_idx, uint32_t dst_cascade_idx )
Merge two cascades in a Brixelizer context. Must be called between calls to “ffxBrixelizerRawContextBegin“ and “ffxBrixelizerRawContextEnd“.

FFX_API FfxErrorCode

Build an AABB tree for a cascade in a Brixelizer context. Must be called between calls to “ffxBrixelizerRawContextBegin“ and “ffxBrixelizerRawContextEnd“.

FFX_API FfxErrorCode

Create a debug visualization output of a Brixelizer context. Must be called between calls to “ffxBrixelizerRawContextBegin“ and “ffxBrixelizerRawContextEnd“.

FFX_API FfxErrorCode

Get the debug counters from a Brixelizer context. Note to use this function the flag “FFX_BRIXELIZER_CONTEXT_FLAG_DEBUG_CONTEXT_READBACK_BUFFERS“ must be passed at context creation.

FFX_API FfxErrorCode

Get the cascade counters from a Brixelizer context. Note to use this function the flag “FFX_BRIXELIZER_CONTEXT_FLAG_DEBUG_CASCADE_READBACK_BUFFERS“ must be passed at context creation.

FFX_API FfxErrorCode

ffxBrixelizerRawContextCreateInstances ( FfxBrixelizerRawContext * context, const FfxBrixelizerRawInstanceDescription * instanceDescriptions, uint32_t numInstanceDescriptions )
Create an instance in a Brixelizer context.

FFX_API FfxErrorCode

ffxBrixelizerRawContextDestroyInstances ( FfxBrixelizerRawContext * context, const FfxBrixelizerInstanceID * instanceIDs, uint32_t numInstanceIDs )
Destroy an instance in a Brixelizer context.

FFX_API FfxErrorCode

Flush all instances added to the Brixelizer context with “ffxBrixelizerRawContextCreateInstance“ to the GPU.

FFX_API FfxErrorCode

ffxBrixelizerRawContextRegisterBuffers ( FfxBrixelizerRawContext * context, const FfxBrixelizerBufferDescription * bufferDescs, uint32_t numBufferDescs )
Register a vertex or index buffer for use with Brixelizer.

FFX_API FfxErrorCode

ffxBrixelizerRawContextUnregisterBuffers ( FfxBrixelizerRawContext * context, const uint32_t* indices, uint32_t numIndices )
Unregister a previously registered vertex or index buffer.

FFX_API FfxErrorCode

Get the index of the recommended cascade to update given the total number of cascades and current frame. Follows the pattern 0 1 0 2 0 1 0 3 0 etc. If 0 is the most detailed cascade and “maxCascades – 1“ is the least detailed cascade this ordering updates more detailed cascades more often.

FFX_API uint32_t

ffxBrixelizerRawGetCascadeToUpdate (uint32_t frameIndex, uint32_t maxCascades)
Get the index of the recommended cascade to update given the total number of cascades and current frame. Follows the pattern 0 1 0 2 0 1 0 3 0 etc. If 0 is the most detailed cascade and “maxCascades – 1“ is the least detailed cascade this ordering updates more detailed cascades more often.

FFX_API bool

Check whether an “FfxResource“ is “NULL“.

FFX_API FfxVersionNumber

Queries the effect version number.

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_CONTEXT_COUNT 1

FidelityFX Brixelizer context count.

FFX_BRIXELIZER_CONTEXT_SIZE (5938838)

The size of the context specified in 32bit values.

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.

FFX_BRIXELIZER_RAW_CONTEXT_SIZE (2924058)

The size of the raw context specified in 32bit values.

FFX_BRIXELIZER_UPDATE_DESCRIPTION_SIZE 2099376

The size of the update description specified in 32bit values.

FFX_BRIXELIZER_VERSION_MAJOR (1)

FidelityFX Brixelizer major version.

FFX_BRIXELIZER_VERSION_MINOR (0)

FidelityFX Brixelizer minor version.

FFX_BRIXELIZER_VERSION_PATCH (0)

FidelityFX Brixelizer patch version.

Detailed description

FidelityFX Brixelizer library.

Typedefs

FfxBrixelizerInstanceID

Copied!

typedef uint32_t FfxBrixelizerInstanceID

An ID value for an instance created with Brixelizer.


Global functions

FfxBrixelizerTraverseRaw

Copied!

FfxBoolean  FfxBrixelizerTraverseRaw (
    in FfxBrixelizerRayDesc  ray_desc,
    out FfxBrixelizerHitRaw  hit
)

This function is used for running a ray query against the Brixelizer SDF acceleration structure. The “raw” version returns the data immediately accessible from the SDF structure generated by a hit.

Parameters:

ray_desc

A structure encapsulating the parameters of the ray for ray traversal. See FfxBrixelizerRayDesc.

hit

A structure of values to be filled in with details of any hit.

Return values:

true

The ray hit the SDF and hit data has been written to the hit parameter.

false

The ray did not intersect the SDF and no hit data has been written.


FfxBrixelizerGetHitNormal

Copied!

FfxFloat32x3  FfxBrixelizerGetHitNormal (FfxBrixelizerHitRaw  hit)

Calculate a normal from a hit described by an FfxBrixelizerHitRaw structure.

Parameters:

hit

A ray hit with the SDF returned by FfxBrixelizerTraverseRaw.

Return values:

A

normal to the hit described by the hit paramter.


FfxBrixelizerTraverse

Copied!

FfxBoolean  FfxBrixelizerTraverse (
    FfxBrixelizerRayDesc  ray_desc,
    out FfxBrixelizerHit  hit
)

This function is used for running a ray query against the Brixelizer SDF acceleration structure. This version simply returns the distance to a hit if a hit is encountered.

Parameters:

ray_desc

A structure encapsulating the parameters of the ray for ray traversal. See FfxBrixelizerRayDesc.

hit

A structure of values to be filled in with details of any hit.

Return values:

true

The ray hit the SDF and hit data has been written to the hit parameter.

false

The ray did not intersect the SDF and no hit data has been written.


FfxBrixelizerTraverseWithNormal

Copied!

FfxBoolean  FfxBrixelizerTraverseWithNormal (
    FfxBrixelizerRayDesc  ray_desc,
    out FfxBrixelizerHitWithNormal  hit
)

This function is used for running a ray query against the Brixelizer SDF acceleration structure. This version returns the distance to a hit and a normal to the SDF geometry at a hit location when a hit is encountered.

Parameters:

ray_desc

A structure encapsulating the parameters of the ray for ray traversal. See FfxBrixelizerRayDesc.

hit

A structure of values to be filled in with details of any hit.

Return values:

true

The ray hit the SDF and hit data has been written to the hit parameter.

false

The ray did not intersect the SDF and no hit data has been written.


ffxBrixelizerGetContextSize

Copied!

size_t ffxBrixelizerGetContextSize ()

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

Returns:

The size in bytes of an FfxBrixelizerContext struct.


ffxBrixelizerContextCreate

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerContextCreate (
    const FfxBrixelizerContextDescription * desc,
    FfxBrixelizerContext * outContext
)

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

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

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

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

Parameters:

desc

An FfxBrixelizerContextDescription structure with the parameters for context creation.

outContext

An FfxBrixelizerContext structure for receiving the initialized Brixelizer context.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerContextDestroy

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerContextDestroy (FfxBrixelizerContext * context)

Delete the Brixelizer context associated with the FfxBrixelizerContext struct.

Parameters:

context

An FfxBrixelizerContext containing the Brixelizer context.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerGetContextInfo

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerGetContextInfo (
    FfxBrixelizerContext * context,
    FfxBrixelizerContextInfo * contextInfo
)

Fill in an FfxBrixelizerContextInfo struct for necessary for updating a constant buffer for use by Brixelizer when ray marching.

Parameters:

context

An FfxBrixelizerContext containing the Brixelizer context.

contextInfo

An FfxBrixelizerContextInfo struct to be filled.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerBakeUpdate

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerBakeUpdate (
    FfxBrixelizerContext * context,
    const FfxBrixelizerUpdateDescription * desc,
    FfxBrixelizerBakedUpdateDescription * outDesc
)

Build an FfxBrixelizerBakedUpdateDescription struct from an FfxBrixelizerUpdateDescription struct for use in doing a Brixelizer update.

Parameters:

context

An FfxBrixelizerContext containing the Brixelizer context.

desc

An FfxBrixelizerUpdateDescription struct containing the parameters for the update.

outDesc

An FfxBrixelizerBakedUpdateDescription struct to be filled in.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerUpdate

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerUpdate (
    FfxBrixelizerContext * context,
    FfxBrixelizerBakedUpdateDescription * desc,
    FfxResource  scratchBuffer,
    FfxCommandList  commandList
)

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

Parameters:

context

An FfxBrixelizerContext containing the Brixelizer context.

desc

An FfxBrixelizerBakedUpdateDescription describing the update to compute.

scratchBuffer

An FfxResource to be used as scratch space by the update.

commandList

An FfxCommandList to write GPU commands to.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerRegisterBuffers

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRegisterBuffers (
    FfxBrixelizerContext * context,
    const FfxBrixelizerBufferDescription * bufferDescs,
    uint32_t numBufferDescs
)

Register a vertex or index buffer to use with Brixelizer.

Parameters:

context

An FfxBrixelizerContext containing the Brixelizer context.

buffer

An FfxResource of the vertex or index buffer.

index

The index of the registered buffer.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerUnregisterBuffers

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerUnregisterBuffers (
    FfxBrixelizerContext * context,
    const uint32_t* indices,
    uint32_t numIndices
)

Unregister a previously registered vertex or index buffer.

Parameters:

context

An FfxBrixelizerContext containing the Brixelizer context.

index

The index of the buffer to unregister.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerCreateInstances

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerCreateInstances (
    FfxBrixelizerContext * context,
    const FfxBrixelizerInstanceDescription * descs,
    uint32_t numDescs
)

Create a static instance for a Brixelizer context.

Parameters:

context

An FfxBrixelizerContext containing the Brixelizer context.

descs

An array of FfxBrixelizerInstanceDescription structs with the parameters for instance creation.

numDescs

The number of entries in the array passed in by descs.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerDeleteInstances

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerDeleteInstances (
    FfxBrixelizerContext * context,
    const FfxBrixelizerInstanceID * instanceIDs,
    uint32_t numInstanceIDs
)

Delete a static instance from a Brixelizer context.

Parameters:

context

An FfxBrixelizerContext containing the Brixelizer context.

instanceIDs

An array of FfxBrixelizerInstanceID s corresponding to instances to be destroyed.

numInstnaceIDs

The number of elements in the array passed in by instanceIDs.

Return values:

FFX_OK

The operation completed successfully.


ffxBrixelizerGetRawContext

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerGetRawContext (
    FfxBrixelizerContext * context,
    FfxBrixelizerRawContext ** outContext
)

Get a pointer to the underlying Brixelizer raw context from a Brixelizer context.

Parameters:

context

An FfxBrixelizerContext containing the Brixelizer context.

outContext

A FfxBrixelizerRawContext representing the underlying Brixelizer raw context.

Returns:

FFX_ERROR_INVALID_POINTER The pointer given was invalid.

FFX_OK The operation completed successfully.


ffxBrixelizerRawGetContextSize

Copied!

size_t ffxBrixelizerRawGetContextSize ()

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

Returns:

The size in bytes of an FfxBrixelizerRawContext struct.


ffxBrixelizerRawContextCreate

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextCreate (
    FfxBrixelizerRawContext * context,
    const FfxBrixelizerRawContextDescription * contextDescription
)

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

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

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

The “FfxBrixelizerRawContext“ should be destroyed when use of it is completed. To destroy the context you should call “ffxBrixelizerContextDestroy“.

**

Parameters:

context

A pointer to a FfxBrixelizerRawContext to populate.

contextDescription

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

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because either context or contextDescription was NULL.

FFX_ERROR_INCOMPLETE_INTERFACE

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

FFX_ERROR_BACKEND_API_ERROR

The operation failed because of an error from the backend.

**


ffxBrixelizerRawContextDestroy

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextDestroy (FfxBrixelizerRawContext * context)

Destroy the FidelityFX Brixelizer context.

Parameters:

context

A pointer to a FfxBrixelizerRawContext structure to destroy.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The context pointer provided was NULL.


ffxBrixelizerRawContextGetInfo

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextGetInfo (
    FfxBrixelizerRawContext * context,
    FfxBrixelizerContextInfo * contextInfo
)

Get an FfxBrixelizerContextInfo structure with the details for context. This call is intended to be used to fill in a constant buffer necessary for making ray queries.

Parameters:

context

The FfxBrixelizerRawContext to receive the FfxBrixelizerContextInfo of.

contextInfo

A FfxBrixelizerContextInfo struct to be filled in.

Return values:

FFX_OK

The operation was successful.

FFX_ERROR_INVALID_POINTER

The context pointer provided was NULL.


ffxBrixelizerRawContextCreateCascade

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextCreateCascade (
    FfxBrixelizerRawContext * context,
    const FfxBrixelizerRawCascadeDescription * cascadeDescription
)

Create a cascade for use with Brixelizer.

Parameters:

context

The FfxBrixelizerRawContext to create a cascade for.

cascadeDescription

A FfxBrixelizerRawCascadeDescription struct specifying the parameters for cascade creation.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because one of context, cascadeDescription, c> cascadeDescription->aabbTree or c> cascadeDescription->brickMap was NULL.

FFX_ERROR_BACKEND_API_ERROR

The operation encountered an error in the backend.


ffxBrixelizerRawContextDestroyCascade

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextDestroyCascade (
    FfxBrixelizerRawContext * context,
    uint32_t cascadeIndex
)

Destroy a cascade previously created with ffxBrixelizerContextCreateCascade.

Parameters:

context

The FfxBrixelizerRawContext to delete a cascade for.

cascadeIndex

The index of the cascade to delete.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.


ffxBrixelizerRawContextResetCascade

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextResetCascade (
    FfxBrixelizerRawContext * context,
    uint32_t cascadeIndex
)

Reset a cascade previously created with ffxBrixelizerContextCreateCascade.

Parameters:

context

The FfxBrixelizerRawContext to reset a cascade for.

cascadeIndex

The index of the cascade to reset.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.

FFX_ERROR_INVALID_ARGUMENT

No cascade with index cascadeIndex exists.


ffxBrixelizerRawContextBegin

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextBegin (
    FfxBrixelizerRawContext * context,
    FfxBrixelizerResources  resources
)

Begin constructing GPU commands for updating SDF acceleration structures with Brixelizer. Must be called between calls to ffxBrixelizerContextBegin and ffxBrixelizerContextEnd.

Parameters:

context

The FfxBrixelizerRawContext to begin a frame for.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.

FFX_ERROR_NULL_DEVICE

The operation failed because the FfxDevice provided to the context was NULL.


ffxBrixelizerRawContextEnd

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextEnd (FfxBrixelizerRawContext * context)

End construcring GPU commands for updating the SDF acceleration structures with Brixelizer.

Parameters:

context

The FfxBrixelizerRawContext to end a frame for.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.

FFX_ERROR_NULL_DEVICE

The operation failed because the FfxDevice provided to the context was NULL.


ffxBrixelizerRawContextSubmit

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextSubmit (
    FfxBrixelizerRawContext * context,
    FfxCommandList  cmdList
)

Record GPU commands to a FfxCommandList for updating acceleration structures with Brixelizer.

Parameters:

context

The FfxBrixelizerRawContext to record GPU commands from.

cmdList

The FfxCommandList to record commands to.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.

FFX_ERROR_NULL_DEVICE

The operation failed because the FfxDevice provided to the context was NULL.


ffxBrixelizerRawContextGetScratchMemorySize

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextGetScratchMemorySize (
    FfxBrixelizerRawContext * context,
    const FfxBrixelizerRawCascadeUpdateDescription * cascadeUpdateDescription,
    size_t* size
)

Get the size in bytes needed from a FfxResource to be used as a scratch buffer in a cascade update.

Parameters:

context

The FfxBrixelizerRawContext to calculate the required scratch buffer size for.

cascadeUpdateDescription

A FfxBrixelizerRawCascadeUpdateDescription struct with the parameters for the cascade update.

size

A size_t to store the required scratch buffer size to.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context or cascadeUpdateDescription was *NULL*.

FFX_ERROR_NULL_DEVICE

The operation failed because the *FfxDevice* provided to the *context* was *NULL*.


ffxBrixelizerRawContextUpdateCascade

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextUpdateCascade (
    FfxBrixelizerRawContext * context,
    const FfxBrixelizerRawCascadeUpdateDescription * cascadeUpdateDescription
)

Update a cascade in a Brixelizer context.

Parameters:

context

The FfxBrixelizerRawContext to perform the cascade update on.

cascadeUpdateDescription

A FfxBrixelizerRawCascadeUpdateDescription struct with the parameters for the cascade update.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context or cascadeUpdateDescription was *NULL*.

FFX_ERROR_NULL_DEVICE

The operation failed because the *FfxDevice* provided to the *context* was *NULL*.


ffxBrixelizerRawContextMergeCascades

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextMergeCascades (
    FfxBrixelizerRawContext * context,
    uint32_t src_cascade_A_idx,
    uint32_t src_cascade_B_idx,
    uint32_t dst_cascade_idx
)

Merge two cascades in a Brixelizer context. Must be called between calls to ffxBrixelizerRawContextBegin and ffxBrixelizerRawContextEnd.

Parameters:

context

The FfxBrixelizerRawContext to merge cascades for.

srcCascadeAIdx

The index of the first source cascade.

srcCascadeBIdx

A FfxResource to store the required scratch buffer size to.

dstCascadeIdx

A FfxResource to store the required scratch buffer size to.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.

FFX_ERROR_NULL_DEVICE

The operation failed because the FfxDevice provided to the context was NULL.


ffxBrixelizerRawContextBuildAABBTree

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextBuildAABBTree (
    FfxBrixelizerRawContext * context,
    uint32_t cascadeIndex
)

Build an AABB tree for a cascade in a Brixelizer context. Must be called between calls to ffxBrixelizerRawContextBegin and ffxBrixelizerRawContextEnd.

Parameters:

context

The FfxBrixelizerRawContext to build an AABB tree for.

cascadeIndex

The index of the cascade to build the AABB tree of.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.

FFX_ERROR_NULL_DEVICE

The operation failed because the FfxDevice provided to the context was NULL.


ffxBrixelizerRawContextDebugVisualization

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextDebugVisualization (
    FfxBrixelizerRawContext * context,
    const FfxBrixelizerDebugVisualizationDescription * debugVisualizationDescription
)

Create a debug visualization output of a Brixelizer context. Must be called between calls to ffxBrixelizerRawContextBegin and ffxBrixelizerRawContextEnd.

Parameters:

context

The FfxBrixelizerRawContext to create a debug visualization for.

debugVisualizationDescription

A FfxBrixelizerDebugVisualizationDescription providing the parameters for the debug visualization.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context or debugVisualizationDescription was NULL.

FFX_ERROR_NULL_DEVICE

The operation failed because the FfxDevice provided to the context was NULL.


ffxBrixelizerRawContextGetDebugCounters

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextGetDebugCounters (
    FfxBrixelizerRawContext * context,
    FfxBrixelizerDebugCounters * debugCounters
)

Get the debug counters from a Brixelizer context. Note to use this function the flag FFX_BRIXELIZER_CONTEXT_FLAG_DEBUG_CONTEXT_READBACK_BUFFERS must be passed at context creation.

Parameters:

context

The FfxBrixelizerRawContext to read the debug counters of.

debugCounters

A FfxBrixelizerDebugCounters struct to read the debug counters to.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context or debugCounters was NULL.


ffxBrixelizerRawContextGetCascadeCounters

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextGetCascadeCounters (
    FfxBrixelizerRawContext * context,
    uint32_t cascadeIndex,
    FfxBrixelizerScratchCounters * counters
)

Get the cascade counters from a Brixelizer context. Note to use this function the flag FFX_BRIXELIZER_CONTEXT_FLAG_DEBUG_CASCADE_READBACK_BUFFERS must be passed at context creation.

Parameters:

context

The FfxBrixelizerRawContext to read the cascade counters of.

cascadeIndex

The index of the cascade to read the cascade counters of.

counters

A FfxBrixelizerScratchCounters struct to read the cascade counters to.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context or counters was NULL.


ffxBrixelizerRawContextCreateInstances

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextCreateInstances (
    FfxBrixelizerRawContext * context,
    const FfxBrixelizerRawInstanceDescription * instanceDescriptions,
    uint32_t numInstanceDescriptions
)

Create an instance in a Brixelizer context.

Parameters:

context

The FfxBrixelizerRawContext to create an instance for.

instanceDescription

A FfxBrixelizerRawInstanceDescription struct with the parameters for the instance to create.

numInstanceDescriptions

A FfxBrixelizerInstanceID to read the instance ID to.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context or instanceDescription was NULL.


ffxBrixelizerRawContextDestroyInstances

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextDestroyInstances (
    FfxBrixelizerRawContext * context,
    const FfxBrixelizerInstanceID * instanceIDs,
    uint32_t numInstanceIDs
)

Destroy an instance in a Brixelizer context.

Parameters:

context

The FfxBrixelizerRawContext to delete an instance for.

instanceId

The FfxBrixelizerInstanceID of the instance to delete.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.


ffxBrixelizerRawContextFlushInstances

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextFlushInstances (
    FfxBrixelizerRawContext * context,
    FfxCommandList  cmdList
)

Flush all instances added to the Brixelizer context with ffxBrixelizerRawContextCreateInstance to the GPU.

Parameters:

context

The FfxBrixelizerRawContext to flush the instances for.

cmdList

An FfxCommandList to record GPU commands to.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.


ffxBrixelizerRawContextRegisterBuffers

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextRegisterBuffers (
    FfxBrixelizerRawContext * context,
    const FfxBrixelizerBufferDescription * bufferDescs,
    uint32_t numBufferDescs
)

Register a vertex or index buffer for use with Brixelizer.

Parameters:

context

The FfxBrixelizerRawContext to register a buffer for.

buffer

An FfxResource with the buffer to be set.

index

The index of the registered buffer.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.


ffxBrixelizerRawContextUnregisterBuffers

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextUnregisterBuffers (
    FfxBrixelizerRawContext * context,
    const uint32_t* indices,
    uint32_t numIndices
)

Unregister a previously registered vertex or index buffer.

Parameters:

context

The FfxBrixelizerRawContext to unregister the buffer from

index

The index of the buffer to unregister.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.


ffxBrixelizerRawContextRegisterScratchBuffer

Copied!

FFX_API  FfxErrorCode  ffxBrixelizerRawContextRegisterScratchBuffer (
    FfxBrixelizerRawContext * context,
    FfxResource  scratchBuffer
)

Get the index of the recommended cascade to update given the total number of cascades and current frame. Follows the pattern 0 1 0 2 0 1 0 3 0 etc. If 0 is the most detailed cascade and maxCascades - 1 is the least detailed cascade this ordering updates more detailed cascades more often.

Parameters:

context

The FfxBrixelizerRawContext to set a buffer for.

scratchBuffer

A FfxResource for use as a scratch buffer.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_POINTER

The operation failed because context was NULL.


ffxBrixelizerRawGetCascadeToUpdate

Copied!

FFX_API  uint32_t ffxBrixelizerRawGetCascadeToUpdate (
    uint32_t frameIndex,
    uint32_t maxCascades
)

Get the index of the recommended cascade to update given the total number of cascades and current frame. Follows the pattern 0 1 0 2 0 1 0 3 0 etc. If 0 is the most detailed cascade and maxCascades - 1 is the least detailed cascade this ordering updates more detailed cascades more often.

Parameters:

frameIndex

The current frame index.

maxCascades

The total number of cascades.

Return values:

The

index of the cascade to update.


ffxBrixelizerRawResourceIsNull

Copied!

FFX_API  bool ffxBrixelizerRawResourceIsNull (FfxResource  resource)

Check whether an FfxResource is NULL.

Parameters:

resource

An FfxResource to check for nullness.

Return values:

<c><i>true</c></i>

if resource is NULL else false.


ffxBrixelizerGetEffectVersion

Copied!

FFX_API  FfxVersionNumber  ffxBrixelizerGetEffectVersion ()

Queries the effect version number.

Returns:

The SDK version the effect was built with.


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_CONTEXT_COUNT

Copied!

#define FFX_BRIXELIZER_CONTEXT_COUNT 1

FidelityFX Brixelizer context count.

Defines the number of internal effect contexts required by Brixelizer


FFX_BRIXELIZER_CONTEXT_SIZE

Copied!

#define FFX_BRIXELIZER_CONTEXT_SIZE (5938838)

The size of the context specified in 32bit values.


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.


FFX_BRIXELIZER_RAW_CONTEXT_SIZE

Copied!

#define FFX_BRIXELIZER_RAW_CONTEXT_SIZE (2924058)

The size of the raw context specified in 32bit values.


FFX_BRIXELIZER_UPDATE_DESCRIPTION_SIZE

Copied!

#define FFX_BRIXELIZER_UPDATE_DESCRIPTION_SIZE 2099376

The size of the update description specified in 32bit values.


FFX_BRIXELIZER_VERSION_MAJOR

Copied!

#define FFX_BRIXELIZER_VERSION_MAJOR (1)

FidelityFX Brixelizer major version.


FFX_BRIXELIZER_VERSION_MINOR

Copied!

#define FFX_BRIXELIZER_VERSION_MINOR (0)

FidelityFX Brixelizer minor version.


FFX_BRIXELIZER_VERSION_PATCH

Copied!

#define FFX_BRIXELIZER_VERSION_PATCH (0)

FidelityFX Brixelizer patch version.