Skip to content

FidelityFX Lens

Navigation: SDKEffect Components

FidelityFX Lens

FidelityFX Lens runtime library.

Defines

FFX_LENS_VERSION_MAJOR

#define FFX_LENS_VERSION_MAJOR (1)

FidelityFX Lens major version.

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 38, column 9)

FFX_LENS_VERSION_MINOR

#define FFX_LENS_VERSION_MINOR (1)

FidelityFX Lens minor version.

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 43, column 9)

FFX_LENS_VERSION_PATCH

#define FFX_LENS_VERSION_PATCH (0)

FidelityFX Lens patch version.

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 48, column 9)

FFX_LENS_CONTEXT_COUNT

#define FFX_LENS_CONTEXT_COUNT 1

FidelityFX Lens context count.

Defines the number of internal effect contexts required by Lens

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 55, column 9)

FFX_LENS_CONTEXT_SIZE

#define FFX_LENS_CONTEXT_SIZE (9200)

The size of the context specified in 32bit values.

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 60, column 9)

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 (FfxLensContext *) – [out] A pointer to a FfxLensContext structure to populate.
  • pContextDescription (const FfxLensContextDescription *) – [in] A pointer to a FfxLensContextDescription structure.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 177, column 22)

ffxLensContextDispatch

FFX_API FfxErrorCode ffxLensContextDispatch(FfxLensContext *pContext, const FfxLensDispatchDescription *pDispatchDescription)

Dispatches work to the FidelityFX Lens context.

Parameters:

  • pContext (FfxLensContext *) – [out] A pointer to a FfxLensContext structure to populate.
  • pDispatchDescription (const FfxLensDispatchDescription *) – [in] A pointer to a FfxLensDispatchDescription structure.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 192, column 22)

ffxLensContextDestroy

FFX_API FfxErrorCode ffxLensContextDestroy(FfxLensContext *pContext)

Destroy the FidelityFX Lens context.

Parameters:

  • pContext (FfxLensContext *) – [out] A pointer to a FfxLensContext structure to destroy.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 204, column 22)

ffxLensGetEffectVersion

FFX_API FfxVersionNumber ffxLensGetEffectVersion()

Queries the effect version number.

Returns: The SDK version the effect was built with.

Returns: FFX_API FfxVersionNumber

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 212, column 26)

Enumerations

FfxLensPass

enum FfxLensPass

An enumeration of the pass which constitutes the Lens algorithm.

Lens is implemented as a single pass algorithm. Each call to the FfxLensScheduleGpuJobFunc callback function will correspond to a single lens effect compute job. For a more comprehensive description of Lens’s inner workings, please refer to the Lens reference documentation.

Values:

FFX_LENS_PASS_MAIN_PASS

FFX_LENS_PASS_MAIN_PASS = 0

A pass which which applies the lens effect.

FFX_LENS_PASS_COUNT

The number of passes in Lens.

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 75, column 1)

FfxLensInitializationFlagBits

enum FfxLensInitializationFlagBits

An enumeration of bit flags used when creating a FfxLensContext. See FfxLensContextDescription.

Values:

FFX_LENS_MATH_NONPACKED

FFX_LENS_MATH_NONPACKED = (1 <<0)

A bit indicating if we should use floating point math.

FFX_LENS_MATH_PACKED

FFX_LENS_MATH_PACKED = (1 <<1)

A bit indicating if we should use 16-bit half precision floating point math (favored)

Source: sdk/include/FidelityFX/host/ffx_lens.h (line 92, column 1)

Dependencies: FfxLensContext, FfxLensContextDescription, FfxLensDispatchDescription