Class DepthOfField
This class holds settings for the Depth of Field effect.
Inherited Members
Namespace: UnityEngine.Rendering.PostProcessing
Syntax
[Serializable]
public sealed class DepthOfField : PostProcessEffectSettings
Fields
aperture
The ratio of the aperture (known as f-stop or f-number). The smaller the value is, the shallower the depth of field is.
Declaration
public FloatParameter aperture
Field Value
Type | Description |
---|---|
FloatParameter |
focalLength
The distance between the lens and the film. The larger the value is, the shallower the depth of field is.
Declaration
public FloatParameter focalLength
Field Value
Type | Description |
---|---|
FloatParameter |
focusDistance
The distance to the point of focus.
Declaration
[Min(0.1F)]
public FloatParameter focusDistance
Field Value
Type | Description |
---|---|
FloatParameter |
kernelSize
The convolution kernel size of the bokeh filter, which determines the maximum radius of bokeh. It also affects the performance (the larger the kernel is, the longer the GPU time is required).
Declaration
[DisplayName("Max Blur Size")]
public KernelSizeParameter kernelSize
Field Value
Type | Description |
---|---|
KernelSizeParameter |
Methods
IsEnabledAndSupported(PostProcessRenderContext)
Returns true
if the effect is currently enabled and supported.
Declaration
public override bool IsEnabledAndSupported(PostProcessRenderContext context)
Parameters
Type | Name | Description |
---|---|---|
PostProcessRenderContext | context | The current post-processing render context |
Returns
Type | Description |
---|---|
System.Boolean |
|