FfxCacaoConstants

A structure for the constant buffer used by FidelityFX CACAO.

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

Detailed description

A structure for the constant buffer used by FidelityFX CACAO.

Data fields

Type

Description

float

CameraTanHalfFOV
Multiply and add values for clip to view depth conversion.

float

NDCToViewMul
tan(fov/2) for the x and y dimensions.

float

NDCToViewAdd
Multiplication value for normalized device coordinates (NDC) to View conversion.

float

DepthBufferUVToViewMul
Addition value for NDC to view conversion.

float

DepthBufferUVToViewAdd
Multiplication value for the depth buffer’s UV to View conversion.

float

EffectRadius
Addition value for the depth buffer’s UV to view conversion.

float

EffectShadowStrength
The radius in world space of the occlusion sphere. A larger radius will make further objects contribute to the ambient occlusion of a point.

float

EffectShadowPow
The linear multiplier for shadows. Higher values intensify the shadow.

float

EffectShadowClamp
The exponent for shadow values. Larger values create darker shadows.

float

EffectFadeOutMul
Clamps the shadow values to be within a certain range.

float

EffectFadeOutAdd
Multiplication value for effect fade out.

float

EffectHorizonAngleThreshold
Addition value for effect fade out.

float

EffectSamplingRadiusNearLimitRec
Minimum angle necessary between geometry and a point to create occlusion. Adjusting this value helps reduce self-shadowing.

float

DepthPrecisionOffsetMod
Default: EffectRadius∗1.2. Used to set limit on the sampling disk size when near.

float

NegRecEffectRadius
Default: 0.9992. Offset used to prevent artifacts due to imprecision.

float

LoadCounterAvgDiv
Negative reciprocal of the effect radius.

float

AdaptiveSampleCountLimit
Multiplier value to get average from loadcounter value.

float

InvSharpness
Limits the total number of samples taken at adaptive quality levels.

int

BlurNumPasses
The sharpness controls how much blur should bleed over edges.

float

BilateralSigmaSquared
Number of blur passes. Default uses 4, with lowest quality using 2.

float

BilateralSimilarityDistanceSigma
Only affects downsampled SSAO. Higher values create a larger blur.

float

PatternRotScaleMatrices
Only affects downsampled SSAO. Lower values create sharper edges.

float

NormalsUnpackMul
Sampling pattern rotation/scale matrices.

float

NormalsUnpackAdd
Multiplication value to unpack normals. Set to 1 if normals are already in [−1,1] range.

float

DetailAOStrength
Addition value to unpack normals. Set to 0 if normals are already in [−1,1]range.

float

Dummy0
Adds in more detailed shadows based on edges. These are less temporally stable.

float

SSAOBufferInverseDimensions
Dimensions of SSAO buffer.

float

DepthBufferInverseDimensions
Dimensions of the depth buffer.

int

Pad
Default is (0,0). Read offset for depth buffer.

float

InputOutputBufferDimensions
UV Offsets used in adaptive approach.

float

InputOutputBufferInverseDimensions
Dimensions of the output AO buffer.

float

ImportanceMapInverseDimensions
Dimensions of the importance map.

float

DeinterleavedDepthBufferInverseDimensions
Dimensions of the deinterleaved depth buffer.

float

DeinterleavedDepthBufferNormalisedOffset
Default is (0,0). Read offset for the deinterleaved depth buffer.

FfxFloat32x4x4

NormalsWorldToViewspaceMatrix
Default is (0,0). Normalized read offset for the deinterleaved depth buffer.