UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DiaphragmDOF::FPhysicalCocModel Struct Reference

#include <DiaphragmDOF.h>

Public Member Functions

void Compile (const FViewInfo &View)
 
FVector2f GetLensRadius () const
 
float DepthToResCocRadius (float SceneDepth, float HorizontalResolution) const
 
FORCEINLINE float ComputeViewMaxBackgroundCocRadius (float HorizontalResolution) const
 
FORCEINLINE float ComputeViewMinForegroundCocRadius (float HorizontalResolution) const
 

Public Attributes

float SensorWidth
 
float SensorHeight
 
float RenderingAspectRatio
 
float VerticalFocalLength
 
float FStops
 
float InfinityBackgroundCocRadius
 
bool bEnableDynamicOffset
 
float InFocusRadius
 
FRHITextureDynamicRadiusOffsetLUT
 
float MinForegroundCocRadius
 
float MaxBackgroundCocRadius
 
float FocusDistance
 
float Squeeze
 
float Petzval
 
float PetzvalFalloffPower
 
FVector2f PetzvalExclusionBoxExtents
 
float PetzvalExclusionBoxRadius
 
float BarrelRadius
 
float BarrelLength
 
TStaticArray< FMatteBoxFlag, MaxMatteBoxFlagsMatteBoxFlags
 
float MaxDepthBlurRadius
 
float DepthBlurExponent
 

Static Public Attributes

static const uint32 MaxMatteBoxFlags = 3
 

Detailed Description

Physically based circle of confusion computation model.

Member Function Documentation

◆ Compile()

void DiaphragmDOF::FPhysicalCocModel::Compile ( const FViewInfo View)

Compile the coc model from a view.

◆ ComputeViewMaxBackgroundCocRadius()

FORCEINLINE float DiaphragmDOF::FPhysicalCocModel::ComputeViewMaxBackgroundCocRadius ( float  HorizontalResolution) const
inline

Returns limit(SceneDepthToCocRadius) for SceneDepth -> Infinity.

◆ ComputeViewMinForegroundCocRadius()

FORCEINLINE float DiaphragmDOF::FPhysicalCocModel::ComputeViewMinForegroundCocRadius ( float  HorizontalResolution) const
inline

Returns limit(SceneDepthToCocRadius) for SceneDepth -> 0.

Note: this return negative or null value since this is foreground.

◆ DepthToResCocRadius()

float DiaphragmDOF::FPhysicalCocModel::DepthToResCocRadius ( float  SceneDepth,
float  HorizontalResolution 
) const

Returns the CocRadius in half res pixels for given scene depth (in world unit).

Notes: Matches Engine/Shaders/Private/DiaphragmDOF/Common.ush's SceneDepthToCocRadius().

◆ GetLensRadius()

FVector2f DiaphragmDOF::FPhysicalCocModel::GetLensRadius ( ) const

Returns the lens radius in unreal unit from which the path traced ray should be traced from.

Member Data Documentation

◆ BarrelLength

float DiaphragmDOF::FPhysicalCocModel::BarrelLength

◆ BarrelRadius

float DiaphragmDOF::FPhysicalCocModel::BarrelRadius

◆ bEnableDynamicOffset

bool DiaphragmDOF::FPhysicalCocModel::bEnableDynamicOffset

Indicates whether a dynamic offset dependent on scene depth should be computed for every pixel

◆ DepthBlurExponent

float DiaphragmDOF::FPhysicalCocModel::DepthBlurExponent

◆ DynamicRadiusOffsetLUT

FRHITexture* DiaphragmDOF::FPhysicalCocModel::DynamicRadiusOffsetLUT

Radius offset lookup table

◆ FocusDistance

float DiaphragmDOF::FPhysicalCocModel::FocusDistance

◆ FStops

float DiaphragmDOF::FPhysicalCocModel::FStops

◆ InfinityBackgroundCocRadius

float DiaphragmDOF::FPhysicalCocModel::InfinityBackgroundCocRadius

◆ InFocusRadius

float DiaphragmDOF::FPhysicalCocModel::InFocusRadius

When dynamic offset is enabled, this is the coc radius at which objects will be perfectly sharp

◆ MatteBoxFlags

TStaticArray<FMatteBoxFlag, MaxMatteBoxFlags> DiaphragmDOF::FPhysicalCocModel::MatteBoxFlags

◆ MaxBackgroundCocRadius

float DiaphragmDOF::FPhysicalCocModel::MaxBackgroundCocRadius

◆ MaxDepthBlurRadius

float DiaphragmDOF::FPhysicalCocModel::MaxDepthBlurRadius

◆ MaxMatteBoxFlags

const uint32 DiaphragmDOF::FPhysicalCocModel::MaxMatteBoxFlags = 3
static

◆ MinForegroundCocRadius

float DiaphragmDOF::FPhysicalCocModel::MinForegroundCocRadius

◆ Petzval

float DiaphragmDOF::FPhysicalCocModel::Petzval

◆ PetzvalExclusionBoxExtents

FVector2f DiaphragmDOF::FPhysicalCocModel::PetzvalExclusionBoxExtents

◆ PetzvalExclusionBoxRadius

float DiaphragmDOF::FPhysicalCocModel::PetzvalExclusionBoxRadius

◆ PetzvalFalloffPower

float DiaphragmDOF::FPhysicalCocModel::PetzvalFalloffPower

◆ RenderingAspectRatio

float DiaphragmDOF::FPhysicalCocModel::RenderingAspectRatio

◆ SensorHeight

float DiaphragmDOF::FPhysicalCocModel::SensorHeight

◆ SensorWidth

float DiaphragmDOF::FPhysicalCocModel::SensorWidth

◆ Squeeze

float DiaphragmDOF::FPhysicalCocModel::Squeeze

◆ VerticalFocalLength

float DiaphragmDOF::FPhysicalCocModel::VerticalFocalLength

The documentation for this struct was generated from the following files: