Struct DepthOfFieldSettings
Contains settings for Depth Of Field effect rendering.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Graphics/PostProcessSettings.h
Syntax
public struct DepthOfFieldSettings : public ISerializable
Fields
BlurStrength
The blur intensity in the out-of-focus areas. Allows reducing the blur amount by scaling down the Gaussian Blur radius. Normalized to range 0-1.
Declaration
public float BlurStrength = 1.0f
Field Value
|
float
|
BokehBlurThreshold
Depth of Field bokeh shape blur threshold.
Declaration
public float BokehBlurThreshold = 0.05f
Field Value
|
float
|
BokehBrightness
Controls brightness of the bokeh shapes. Can be used to fade them or make more intense.
Declaration
public float BokehBrightness = 1.0f
Field Value
|
float
|
BokehBrightnessThreshold
The minimum pixel brightness to create the bokeh. Pixels with lower brightness will be skipped.
Declaration
public float BokehBrightnessThreshold = 3.0f
Field Value
|
float
|
BokehDepthCutoff
Controls bokeh shape generation for depth discontinuities.
Declaration
public float BokehDepthCutoff = 1.5f
Field Value
|
float
|
BokehEnabled
If checked, bokeh shapes will be rendered.
Declaration
public bool BokehEnabled = true
Field Value
|
bool
|
BokehFalloff
Controls bokeh shape brightness falloff. Higher values reduce bokeh visibility.
Declaration
public float BokehFalloff = 0.5f
Field Value
|
float
|
BokehShape
Defines the type of the bokeh shapes.
Declaration
public BokehShapeType BokehShape = BokehShapeType::Octagon
Field Value
|
BokehShapeType
|
BokehShapeCustom
If BokehShape is set to Custom, then this texture will be used for the bokeh shapes. For best performance, use small, compressed, grayscale textures (for instance 32px).
Declaration
public SoftAssetReference<Texture> BokehShapeCustom
Field Value
|
SoftAssetReference<Texture>
|
BokehSize
Controls size of the bokeh shapes.
Declaration
public float BokehSize = 25.0f
Field Value
|
float
|
DepthLimit
The distance in World Units which describes border after that there is no blur (useful to disable DoF on sky). Use 0 to disable that feature.
Declaration
public float DepthLimit = 0.0f
Field Value
|
float
|
Enabled
If checked, the depth of field effect will be visible.
Declaration
public bool Enabled = false
Field Value
|
bool
|
FarTransitionRange
The distance in World Units from the focal region on the side farther from the camera over which the scene transitions from focused to blurred.
Declaration
public float FarTransitionRange = 500.0f
Field Value
|
float
|
FocalDistance
The distance in World Units from the camera that acts as the center of the region where the scene is perfectly in focus and no blurring occurs.
Declaration
public float FocalDistance = 1700.0f
Field Value
|
float
|
FocalRegion
The distance in World Units beyond the focal distance where the scene is perfectly in focus and no blurring occurs.
Declaration
public float FocalRegion = 3000.0f
Field Value
|
float
|
NearTransitionRange
The distance in World Units from the focal region on the side nearer to the camera over which the scene transitions from focused to blurred.
Declaration
public float NearTransitionRange = 300.0f
Field Value
|
float
|
OverrideFlags
The flags for overriden properties.
Declaration
public DepthOfFieldSettingsOverride OverrideFlags = Override::None
Field Value
|
DepthOfFieldSettingsOverride
|
Methods
BlendWith(DepthOfFieldSettings& other, float weight)
Blends the settings using given weight.
Declaration
public void BlendWith(DepthOfFieldSettings& other, float weight)
Parameters
|
DepthOfFieldSettings
other
The other settings. |
|
float
weight
The blend weight. |