FidelityFX Lens
FidelityFX Lens runtime library.
Enumerations
Name |
Description |
---|---|
FfxLensInitializationFlagBits |
An enumeration of bit flags used when creating a “FfxLensContext“. See “FfxLensContextDescription“.
FFX_LENS_MATH_NONPACKED = (1 << 0) – A bit indicating if we should use floating point math.
FFX_LENS_MATH_PACKED = (1 << 1) – A bit indicating if we should use 16-bit half precision floating point math (favored)
|
FfxLensPass |
An enumeration of the pass which constitutes the Lens algorithm.
FFX_LENS_PASS_MAIN_PASS = 0 – A pass which which applies the lens effect.
FFX_LENS_PASS_COUNT – The number of passes in Lens.
|
Structs
Name |
Description |
---|---|
A structure encapsulating the FidelityFX Lens context.
|
|
A structure encapsulating the parameters required to initialize FidelityFX Lens.
|
|
A structure encapsulating the parameters for dispatching of FidelityFX Lens.
|
Functions
Return type |
Description |
---|---|
ffxLensContextCreate ( FfxLensContext * pContext, const FfxLensContextDescription * pContextDescription )
Create a FidelityFX Lens Downsampler context from the parameters programmed to the “FfxLensContextDescription“ structure.
|
|
ffxLensContextDispatch ( FfxLensContext * pContext, const FfxLensDispatchDescription * pDispatchDescription )
Dispatches work to the FidelityFX Lens context.
|
|
ffxLensContextDestroy (FfxLensContext * pContext)
Destroy the FidelityFX Lens context.
|
|
Queries the effect version number.
|
Macros
Name |
Description |
---|---|
FidelityFX Lens context count.
|
|
FFX_LENS_CONTEXT_SIZE (9200) |
The size of the context specified in 32bit values.
|
FidelityFX Lens major version.
|
|
FidelityFX Lens minor version.
|
|
FidelityFX Lens patch version.
|
Detailed description
FidelityFX Lens runtime library.
Global functions
ffxLensContextCreate
FFX_API FfxErrorCode ffxLensContextCreate (
FfxLensContext * pContext,
const FfxLensContextDescription * pContextDescription
)
Create a FidelityFX Lens Downsampler context from the parameters programmed to the FfxLensContextDescription
structure.
The context structure is the main object used to interact with the Lens API, and is responsible for the management of the internal resources used by the Lens 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 Lens to function. Depending on the precise configuration used when creating the FfxLensContext
a different set of resources and pipelines might be requested via the callback functions.
The FfxLensContext
should be destroyed when use of it is completed, typically when an application is unloaded or Lens upscaling is disabled by a user. To destroy the Lens context you should call ffxLensContextDestroy
.
Parameters:
pContext |
A pointer to a |
pContextDescription |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_CODE_NULL_POINTER |
The operation failed because either |
FFX_ERROR_INCOMPLETE_INTERFACE |
The operation failed because the |
FFX_ERROR_BACKEND_API_ERROR |
The operation failed because of an error returned from the backend. |
ffxLensContextDispatch
FFX_API FfxErrorCode ffxLensContextDispatch (
FfxLensContext * pContext,
const FfxLensDispatchDescription * pDispatchDescription
)
Dispatches work to the FidelityFX Lens context.
Parameters:
pContext |
A pointer to a |
pDispatchDescription |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_CODE_NULL_POINTER |
The operation failed because either |
FFX_ERROR_BACKEND_API_ERROR |
The operation failed because of an error returned from the backend. |
ffxLensContextDestroy
FFX_API FfxErrorCode ffxLensContextDestroy (FfxLensContext * pContext)
Destroy the FidelityFX Lens context.
Parameters:
pContext |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_CODE_NULL_POINTER |
The operation failed because either |
ffxLensGetEffectVersion
FFX_API FfxVersionNumber ffxLensGetEffectVersion ()
Queries the effect version number.
Returns:
The SDK version the effect was built with.
Macros
FFX_LENS_CONTEXT_COUNT
FidelityFX Lens context count.
Defines the number of internal effect contexts required by Lens
FFX_LENS_CONTEXT_SIZE
The size of the context specified in 32bit values.
FFX_LENS_VERSION_MAJOR
FidelityFX Lens major version.
FFX_LENS_VERSION_MINOR
FidelityFX Lens minor version.
FFX_LENS_VERSION_PATCH
FidelityFX Lens patch version.