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 |
---|---|
A structure representing an axis aligned bounding box for use with Brixelizer.
|
|
A structure generated by Brixelizer from an “FfxBrixelizerUpdateDescription“ structure used for storing parameters necessary for an update with the underlying raw Brixelizer API.
|
|
A structure encapsulating the parameters necessary to register a buffer with the Brixelizer API.
|
|
A structure encapsulating the parameters for cascade creation.
|
|
A structure of parameters describing a cascade. This structure is primarily for Brixelizer internal use.
|
|
A structure representing the external resources needed for a Brixelizer cascade.
|
|
A structure containing the statistics for a Brixelizer cascade readable after an update of the Brixelizer API.
|
|
A structure encapsulating the FidelityFX Brixelizer context.
|
|
A structure encapsulating the parameters for creating a Brixelizer context.
|
|
A structure of parameters describing the Brixelizer context. This structure is primarily for Brixelizer internal use.
|
|
A structure containing the statistics for a Brixelizer context readable after an update of the Brixelizer API.
|
|
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.
|
|
A structure encapsulating the parameters for drawing a debug visualization.
|
|
A structure encapsulating minimal data associated with a ray SDF hit.
|
|
A structure encapsulating all data associated with a ray SDF hit.
|
|
A structure encapsulating the distance to a ray hit and the normal of the surface hit.
|
|
A structure encapsulating the parameters necessary to create an instance with Brixelizer.
|
|
A structure encapsulating the parameters for creating a Brixelizer cascade.
|
|
A structure encapsulating the parameters for updating a Brixelizer cascade.
|
|
A structure encapsulating the FidelityFX Brixelizer context.
|
|
A structure encapsulating the parameters for creating a Brixelizer context.
|
|
A structure encapsulating the parameters for an instance to be added to a Brixelizer context.
|
|
A structure describing a Brixelizer job.
|
|
A structure encapsulating the parameters for a ray to be marched using Brixelizer.
|
|
A structure representing all external resources for use with Brixelizer.
|
|
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.
|
|
A structure containing the statistics readable after an update of the Brixelizer API.
|
|
A structure encapsulating the parameters used for computing an update by the Brixelizer context.
|
Functions
Return type |
Description |
---|---|
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.
|
|
Calculate a normal from a hit described by an “FfxBrixelizerHitRaw“ structure.
|
|
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.
|
|
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.
|
|
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)“.
|
ffxBrixelizerContextCreate ( const FfxBrixelizerContextDescription * desc, FfxBrixelizerContext * outContext )
Create a FidelityFX Brixelizer context from the parameters specified to the “FfxBrixelizerContextDesc“ struct.
|
|
ffxBrixelizerContextDestroy (FfxBrixelizerContext * context)
Delete the Brixelizer context associated with the “FfxBrixelizerContext“ struct.
|
|
ffxBrixelizerGetContextInfo ( FfxBrixelizerContext * context, FfxBrixelizerContextInfo * contextInfo )
Fill in an “FfxBrixelizerContextInfo“ struct for necessary for updating a constant buffer for use by Brixelizer when ray marching.
|
|
ffxBrixelizerBakeUpdate ( FfxBrixelizerContext * context, const FfxBrixelizerUpdateDescription * desc, FfxBrixelizerBakedUpdateDescription * outDesc )
Build an “FfxBrixelizerBakedUpdateDescription“ struct from an “FfxBrixelizerUpdateDescription“ struct for use in doing a Brixelizer update.
|
|
ffxBrixelizerUpdate ( FfxBrixelizerContext * context, FfxBrixelizerBakedUpdateDescription * desc, FfxResource scratchBuffer, FfxCommandList commandList )
Perform an update of Brixelizer, recording GPU commands to a command list.
|
|
ffxBrixelizerRegisterBuffers ( FfxBrixelizerContext * context, const FfxBrixelizerBufferDescription * bufferDescs, uint32_t numBufferDescs )
Register a vertex or index buffer to use with Brixelizer.
|
|
ffxBrixelizerUnregisterBuffers ( FfxBrixelizerContext * context, const uint32_t* indices, uint32_t numIndices )
Unregister a previously registered vertex or index buffer.
|
|
ffxBrixelizerCreateInstances ( FfxBrixelizerContext * context, const FfxBrixelizerInstanceDescription * descs, uint32_t numDescs )
Create a static instance for a Brixelizer context.
|
|
ffxBrixelizerDeleteInstances ( FfxBrixelizerContext * context, const FfxBrixelizerInstanceID * instanceIDs, uint32_t numInstanceIDs )
Delete a static instance from a Brixelizer context.
|
|
ffxBrixelizerGetRawContext ( FfxBrixelizerContext * context, FfxBrixelizerRawContext ** outContext )
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)“.
|
ffxBrixelizerRawContextCreate ( FfxBrixelizerRawContext * context, const FfxBrixelizerRawContextDescription * contextDescription )
Create a FidelityFX Brixelizer context from the parameters specified to the “FfxBrixelizerRawContextDescription“ struct.
|
|
Destroy the FidelityFX Brixelizer context.
|
|
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.
|
|
ffxBrixelizerRawContextCreateCascade ( FfxBrixelizerRawContext * context, const FfxBrixelizerRawCascadeDescription * cascadeDescription )
Create a cascade for use with Brixelizer.
|
|
ffxBrixelizerRawContextDestroyCascade ( FfxBrixelizerRawContext * context, uint32_t cascadeIndex )
Destroy a cascade previously created with “ffxBrixelizerContextCreateCascade“.
|
|
ffxBrixelizerRawContextResetCascade ( FfxBrixelizerRawContext * context, uint32_t cascadeIndex )
Reset a cascade previously created with “ffxBrixelizerContextCreateCascade“.
|
|
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“.
|
|
ffxBrixelizerRawContextEnd (FfxBrixelizerRawContext * context)
End construcring GPU commands for updating the SDF acceleration structures with Brixelizer.
|
|
Record GPU commands to a “FfxCommandList“ for updating acceleration structures with Brixelizer.
|
|
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.
|
|
ffxBrixelizerRawContextUpdateCascade ( FfxBrixelizerRawContext * context, const FfxBrixelizerRawCascadeUpdateDescription * cascadeUpdateDescription )
Update a cascade in a Brixelizer context.
|
|
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“.
|
|
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“.
|
|
ffxBrixelizerRawContextDebugVisualization ( FfxBrixelizerRawContext * context, const FfxBrixelizerDebugVisualizationDescription * debugVisualizationDescription )
Create a debug visualization output of a Brixelizer context. Must be called between calls to “ffxBrixelizerRawContextBegin“ and “ffxBrixelizerRawContextEnd“.
|
|
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.
|
|
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.
|
|
ffxBrixelizerRawContextCreateInstances ( FfxBrixelizerRawContext * context, const FfxBrixelizerRawInstanceDescription * instanceDescriptions, uint32_t numInstanceDescriptions )
Create an instance in a Brixelizer context.
|
|
ffxBrixelizerRawContextDestroyInstances ( FfxBrixelizerRawContext * context, const FfxBrixelizerInstanceID * instanceIDs, uint32_t numInstanceIDs )
Destroy an instance in a Brixelizer context.
|
|
Flush all instances added to the Brixelizer context with “ffxBrixelizerRawContextCreateInstance“ to the GPU.
|
|
ffxBrixelizerRawContextRegisterBuffers ( FfxBrixelizerRawContext * context, const FfxBrixelizerBufferDescription * bufferDescs, uint32_t numBufferDescs )
Register a vertex or index buffer for use with Brixelizer.
|
|
ffxBrixelizerRawContextUnregisterBuffers ( FfxBrixelizerRawContext * context, const uint32_t* indices, uint32_t numIndices )
Unregister a previously registered vertex or index buffer.
|
|
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.
|
|
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 |
ffxBrixelizerRawResourceIsNull (FfxResource resource)
Check whether an “FfxResource“ is “NULL“.
|
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)“.
|
ffxBrixelizerGIContextCreate ( FfxBrixelizerGIContext * pContext, const FfxBrixelizerGIContextDescription * pContextDescription )
Create a FidelityFX Brixelizer GI context from the parameters specified to the “FfxBrixelizerGIContextDescription“ struct.
|
|
ffxBrixelizerGIContextDestroy (FfxBrixelizerGIContext * pContext)
Destroy the FidelityFX Brixelizer GI context.
|
|
ffxBrixelizerGIContextDispatch ( FfxBrixelizerGIContext * pContext, const FfxBrixelizerGIDispatchDescription * pDispatchDescription, FfxCommandList pCommandList )
Perform an update of Brixelizer GI, recording GPU commands to a command list.
|
|
ffxBrixelizerGIContextDebugVisualization ( FfxBrixelizerGIContext * pContext, const FfxBrixelizerGIDebugDescription * pDebugDescription, FfxCommandList pCommandList )
Make a debug visualization from the “FfxBrixelizerGIContext“.
|
|
Queries the effect version number.
|
Macros
Name |
Description |
---|---|
FidelityFX Brixelizer context count.
|
|
FFX_BRIXELIZER_CONTEXT_SIZE (5938838) |
The size of the context specified in 32bit values.
|
FidelityFX Brixelizer GI context count.
|
|
FFX_BRIXELIZER_GI_CONTEXT_SIZE (210000) |
The size of the context specified in 32bit values.
|
FidelityFX Brixelizer GI major version.
|
|
FidelityFX Brixelizer GI minor version.
|
|
FidelityFX Brixelizer GI patch version.
|
|
FFX_BRIXELIZER_RAW_CONTEXT_SIZE (2924058) |
The size of the raw context specified in 32bit values.
|
The size of the update description specified in 32bit values.
|
|
FidelityFX Brixelizer major version.
|
|
FidelityFX Brixelizer minor version.
|
|
FidelityFX Brixelizer patch version.
|
Detailed description
FidelityFX Brixelizer library.
Typedefs
FfxBrixelizerInstanceID
An ID value for an instance created with Brixelizer.
Global functions
FfxBrixelizerTraverseRaw
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 |
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 |
false |
The ray did not intersect the SDF and no hit data has been written. |
FfxBrixelizerGetHitNormal
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 |
Return values:
A |
normal to the hit described by the |
FfxBrixelizerTraverse
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 |
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 |
false |
The ray did not intersect the SDF and no hit data has been written. |
FfxBrixelizerTraverseWithNormal
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 |
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 |
false |
The ray did not intersect the SDF and no hit data has been written. |
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
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 |
outContext |
An |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerContextDestroy
FFX_API FfxErrorCode ffxBrixelizerContextDestroy (FfxBrixelizerContext * context)
Delete the Brixelizer context associated with the FfxBrixelizerContext
struct.
Parameters:
context |
An |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerGetContextInfo
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 |
contextInfo |
An |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerBakeUpdate
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 |
desc |
An |
outDesc |
An |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerUpdate
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 |
desc |
An |
scratchBuffer |
An |
commandList |
An |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerRegisterBuffers
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 |
buffer |
An |
index |
The index of the registered buffer. |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerUnregisterBuffers
FFX_API FfxErrorCode ffxBrixelizerUnregisterBuffers (
FfxBrixelizerContext * context,
const uint32_t* indices,
uint32_t numIndices
)
Unregister a previously registered vertex or index buffer.
Parameters:
context |
An |
index |
The index of the buffer to unregister. |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerCreateInstances
FFX_API FfxErrorCode ffxBrixelizerCreateInstances (
FfxBrixelizerContext * context,
const FfxBrixelizerInstanceDescription * descs,
uint32_t numDescs
)
Create a static instance for a Brixelizer context.
Parameters:
context |
An |
descs |
An array of |
numDescs |
The number of entries in the array passed in by |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerDeleteInstances
FFX_API FfxErrorCode ffxBrixelizerDeleteInstances (
FfxBrixelizerContext * context,
const FfxBrixelizerInstanceID * instanceIDs,
uint32_t numInstanceIDs
)
Delete a static instance from a Brixelizer context.
Parameters:
context |
An |
instanceIDs |
An array of |
numInstnaceIDs |
The number of elements in the array passed in by |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerGetRawContext
FFX_API FfxErrorCode ffxBrixelizerGetRawContext (
FfxBrixelizerContext * context,
FfxBrixelizerRawContext ** outContext
)
Get a pointer to the underlying Brixelizer raw context from a Brixelizer context.
Parameters:
context |
An |
outContext |
A |
Returns:
FFX_ERROR_INVALID_POINTER The pointer given was invalid.
FFX_OK The operation completed successfully.
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
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 |
contextDescription |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because either |
FFX_ERROR_INCOMPLETE_INTERFACE |
The operation failed because |
FFX_ERROR_BACKEND_API_ERROR |
The operation failed because of an error from the backend. |
**
ffxBrixelizerRawContextDestroy
FFX_API FfxErrorCode ffxBrixelizerRawContextDestroy (FfxBrixelizerRawContext * context)
Destroy the FidelityFX Brixelizer context.
Parameters:
context |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The |
ffxBrixelizerRawContextGetInfo
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 |
contextInfo |
A |
Return values:
FFX_OK |
The operation was successful. |
FFX_ERROR_INVALID_POINTER |
The |
ffxBrixelizerRawContextCreateCascade
FFX_API FfxErrorCode ffxBrixelizerRawContextCreateCascade (
FfxBrixelizerRawContext * context,
const FfxBrixelizerRawCascadeDescription * cascadeDescription
)
Create a cascade for use with Brixelizer.
Parameters:
context |
The |
cascadeDescription |
A |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because one of |
FFX_ERROR_BACKEND_API_ERROR |
The operation encountered an error in the backend. |
ffxBrixelizerRawContextDestroyCascade
FFX_API FfxErrorCode ffxBrixelizerRawContextDestroyCascade (
FfxBrixelizerRawContext * context,
uint32_t cascadeIndex
)
Destroy a cascade previously created with ffxBrixelizerContextCreateCascade
.
Parameters:
context |
The |
cascadeIndex |
The index of the cascade to delete. |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
ffxBrixelizerRawContextResetCascade
FFX_API FfxErrorCode ffxBrixelizerRawContextResetCascade (
FfxBrixelizerRawContext * context,
uint32_t cascadeIndex
)
Reset a cascade previously created with ffxBrixelizerContextCreateCascade
.
Parameters:
context |
The |
cascadeIndex |
The index of the cascade to reset. |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
FFX_ERROR_INVALID_ARGUMENT |
No cascade with index |
ffxBrixelizerRawContextBegin
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 |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
FFX_ERROR_NULL_DEVICE |
The operation failed because the |
ffxBrixelizerRawContextEnd
FFX_API FfxErrorCode ffxBrixelizerRawContextEnd (FfxBrixelizerRawContext * context)
End construcring GPU commands for updating the SDF acceleration structures with Brixelizer.
Parameters:
context |
The |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
FFX_ERROR_NULL_DEVICE |
The operation failed because the |
ffxBrixelizerRawContextSubmit
FFX_API FfxErrorCode ffxBrixelizerRawContextSubmit (
FfxBrixelizerRawContext * context,
FfxCommandList cmdList
)
Record GPU commands to a FfxCommandList
for updating acceleration structures with Brixelizer.
Parameters:
context |
The |
cmdList |
The |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
FFX_ERROR_NULL_DEVICE |
The operation failed because the |
ffxBrixelizerRawContextGetScratchMemorySize
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 |
cascadeUpdateDescription |
A |
size |
A |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
FFX_ERROR_NULL_DEVICE |
|
ffxBrixelizerRawContextUpdateCascade
FFX_API FfxErrorCode ffxBrixelizerRawContextUpdateCascade (
FfxBrixelizerRawContext * context,
const FfxBrixelizerRawCascadeUpdateDescription * cascadeUpdateDescription
)
Update a cascade in a Brixelizer context.
Parameters:
context |
The |
cascadeUpdateDescription |
A |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
FFX_ERROR_NULL_DEVICE |
|
ffxBrixelizerRawContextMergeCascades
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 |
srcCascadeAIdx |
The index of the first source cascade. |
srcCascadeBIdx |
A |
dstCascadeIdx |
A |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
FFX_ERROR_NULL_DEVICE |
The operation failed because the |
ffxBrixelizerRawContextBuildAABBTree
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 |
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 |
FFX_ERROR_NULL_DEVICE |
The operation failed because the |
ffxBrixelizerRawContextDebugVisualization
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 |
debugVisualizationDescription |
A |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
FFX_ERROR_NULL_DEVICE |
The operation failed because the |
ffxBrixelizerRawContextGetDebugCounters
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 |
debugCounters |
A |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
ffxBrixelizerRawContextGetCascadeCounters
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 |
cascadeIndex |
The index of the cascade to read the cascade counters of. |
counters |
A |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
ffxBrixelizerRawContextCreateInstances
FFX_API FfxErrorCode ffxBrixelizerRawContextCreateInstances (
FfxBrixelizerRawContext * context,
const FfxBrixelizerRawInstanceDescription * instanceDescriptions,
uint32_t numInstanceDescriptions
)
Create an instance in a Brixelizer context.
Parameters:
context |
The |
instanceDescription |
A |
numInstanceDescriptions |
A |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
ffxBrixelizerRawContextDestroyInstances
FFX_API FfxErrorCode ffxBrixelizerRawContextDestroyInstances (
FfxBrixelizerRawContext * context,
const FfxBrixelizerInstanceID * instanceIDs,
uint32_t numInstanceIDs
)
Destroy an instance in a Brixelizer context.
Parameters:
context |
The |
instanceId |
The |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
ffxBrixelizerRawContextFlushInstances
FFX_API FfxErrorCode ffxBrixelizerRawContextFlushInstances (
FfxBrixelizerRawContext * context,
FfxCommandList cmdList
)
Flush all instances added to the Brixelizer context with ffxBrixelizerRawContextCreateInstance
to the GPU.
Parameters:
context |
The |
cmdList |
An |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
ffxBrixelizerRawContextRegisterBuffers
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 |
buffer |
An |
index |
The index of the registered buffer. |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
ffxBrixelizerRawContextUnregisterBuffers
FFX_API FfxErrorCode ffxBrixelizerRawContextUnregisterBuffers (
FfxBrixelizerRawContext * context,
const uint32_t* indices,
uint32_t numIndices
)
Unregister a previously registered vertex or index buffer.
Parameters:
context |
The |
index |
The index of the buffer to unregister. |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
ffxBrixelizerRawContextRegisterScratchBuffer
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 |
scratchBuffer |
A |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because |
ffxBrixelizerRawGetCascadeToUpdate
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
FFX_API bool ffxBrixelizerRawResourceIsNull (FfxResource resource)
Check whether an FfxResource
is NULL
.
Parameters:
resource |
An |
Return values:
<c><i>true</c></i> |
if |
ffxBrixelizerGetEffectVersion
FFX_API FfxVersionNumber ffxBrixelizerGetEffectVersion ()
Queries the effect version number.
Returns:
The SDK version the effect was built with.
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
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 |
pContextDescription |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The operation failed because either |
FFX_ERROR_INCOMPLETE_INTERFACE |
The operation failed because |
FFX_ERROR_BACKEND_API_ERROR |
The operation failed because of an error from the backend. |
ffxBrixelizerGIContextDestroy
FFX_API FfxErrorCode ffxBrixelizerGIContextDestroy (FfxBrixelizerGIContext * pContext)
Destroy the FidelityFX Brixelizer GI context.
Parameters:
pContext |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_POINTER |
The |
ffxBrixelizerGIContextDispatch
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 |
pDispatchDescription |
A pointer to a |
pCommandList |
An |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerGIContextDebugVisualization
FFX_API FfxErrorCode ffxBrixelizerGIContextDebugVisualization (
FfxBrixelizerGIContext * pContext,
const FfxBrixelizerGIDebugDescription * pDebugDescription,
FfxCommandList pCommandList
)
Make a debug visualization from the FfxBrixelizerGIContext
.
Parameters:
context |
An |
pDebugDescription |
A pointer to a |
pCommandList |
An |
Return values:
FFX_OK |
The operation completed successfully. |
ffxBrixelizerGIGetEffectVersion
FFX_API FfxVersionNumber ffxBrixelizerGIGetEffectVersion ()
Queries the effect version number.
Returns:
The SDK version the effect was built with.
Macros
FFX_BRIXELIZER_CONTEXT_COUNT
FidelityFX Brixelizer context count.
Defines the number of internal effect contexts required by Brixelizer
FFX_BRIXELIZER_CONTEXT_SIZE
The size of the context specified in 32bit values.
FFX_BRIXELIZER_GI_CONTEXT_COUNT
FidelityFX Brixelizer GI context count.
Defines the number of internal effect contexts required by Brixelizer
FFX_BRIXELIZER_GI_CONTEXT_SIZE
The size of the context specified in 32bit values.
FFX_BRIXELIZER_GI_VERSION_MAJOR
FidelityFX Brixelizer GI major version.
FFX_BRIXELIZER_GI_VERSION_MINOR
FidelityFX Brixelizer GI minor version.
FFX_BRIXELIZER_GI_VERSION_PATCH
FidelityFX Brixelizer GI patch version.
FFX_BRIXELIZER_RAW_CONTEXT_SIZE
The size of the raw context specified in 32bit values.
FFX_BRIXELIZER_UPDATE_DESCRIPTION_SIZE
The size of the update description specified in 32bit values.
FFX_BRIXELIZER_VERSION_MAJOR
FidelityFX Brixelizer major version.
FFX_BRIXELIZER_VERSION_MINOR
FidelityFX Brixelizer minor version.
FFX_BRIXELIZER_VERSION_PATCH
FidelityFX Brixelizer patch version.