FfxCacaoSettings

A structure for the settings used by FidelityFX CACAO. These settings may be updated with each draw call.

File location: sdk/include/FidelityFX/host/ffx_cacao.h

Detailed description

A structure for the settings used by FidelityFX CACAO. These settings may be updated with each draw call.

Data fields

Type

Description

float

radius
[0.0, ~ ] World (view) space size of the occlusion sphere.

float

shadowMultiplier
[0.0, 5.0] Effect strength linear multiplier.

float

shadowPower
[0.5, 5.0] Effect strength pow modifier.

float

shadowClamp
[0.0, 1.0] Effect max limit (applied after multiplier but before blur).

float

horizonAngleThreshold
[0.0, 0.2] Limits self-shadowing (makes the sampling area less of a hemisphere, more of a spherical cone, to avoid self-shadowing and various artifacts due to low tessellation and depth buffer imprecision, etc.).

float

fadeOutFrom
[0.0, ~ ] Distance to start fading out the effect.

float

fadeOutTo
[0.0, ~ ] Distance at which the effect is faded out.

FfxCacaoQuality

qualityLevel
Effect quality, affects number of taps etc.

float

adaptiveQualityLimit
[0.0, 1.0] (only for quality level FFX_CACAO_QUALITY_HIGHEST).

uint32_t

blurPassCount
[ 0, 8] Number of edge-sensitive smart blur passes to apply.

float

sharpness
[0.0, 1.0] How much to bleed over edges; 1: not at all, 0.5: half-half; 0.0: completely ignore edges.

float

temporalSupersamplingAngleOffset
[0.0, PI] Used to rotate sampling kernel; If using temporal AA / supersampling, suggested to rotate by ( (frame%3)/3.0*PI ) or similar. Kernel is already symmetrical, which is why we use PI and not 2*PI.

float

temporalSupersamplingRadiusOffset
[0.0, 2.0] Used to scale sampling kernel; If using temporal AA / supersampling, suggested to scale by ( 1.0f + (((frame%3)-1.0)/3.0)*0.1 ) or similar.

float

detailShadowStrength
[0.0, 5.0] Used for high-res detail AO using neighboring depth pixels: adds a lot of detail but also reduces temporal stability (adds aliasing).

bool

generateNormals
This option should be set to FFX_CACAO_TRUE if FidelityFX-CACAO should reconstruct a normal buffer from the depth buffer. It is required to be FFX_CACAO_TRUE if no normal buffer is provided.

float

bilateralSigmaSquared
[0.0, ~ ] Sigma squared value for use in bilateral upsampler giving Gaussian blur term. Should be greater than 0.0.

float

bilateralSimilarityDistanceSigma
[0.0, ~ ] Sigma squared value for use in bilateral upsampler giving similarity weighting for neighbouring pixels. Should be greater than 0.0.