Class DepthOfField
A volume component that holds settings for the Depth Of Field effect.
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Syntax
[Serializable]
public sealed class DepthOfField : VolumeComponentWithQuality, IPostProcessComponent
Fields
farFocusEnd
Sets the distance from the Camera at which the far field blur reaches its maximum blur radius.
Declaration
[Tooltip("Sets the distance from the Camera at which the far field blur reaches its maximum blur radius.")]
public MinFloatParameter farFocusEnd
Field Value
Type | Description |
---|---|
MinFloatParameter |
farFocusStart
Sets the distance from the Camera at which the far field starts blurring.
Declaration
[Tooltip("Sets the distance from the Camera at which the far field starts blurring.")]
public MinFloatParameter farFocusStart
Field Value
Type | Description |
---|---|
MinFloatParameter |
focusDistance
Sets the distance to the focus point from the Camera.
Declaration
[Tooltip("Sets the distance to the focus point from the Camera.")]
public MinFloatParameter focusDistance
Field Value
Type | Description |
---|---|
MinFloatParameter |
focusMode
Specifies the mode that HDRP uses to set the focus for the depth of field effect.
Declaration
[Tooltip("Specifies the mode that HDRP uses to set the focus for the depth of field effect.")]
public DepthOfFieldModeParameter focusMode
Field Value
Type | Description |
---|---|
DepthOfFieldModeParameter |
See Also
nearFocusEnd
Sets the distance from the Camera at which the near field does not blur anymore.
Declaration
[Tooltip("Sets the distance from the Camera at which the near field does not blur anymore.")]
public MinFloatParameter nearFocusEnd
Field Value
Type | Description |
---|---|
MinFloatParameter |
nearFocusStart
Sets the distance from the Camera at which the near field blur begins to decrease in intensity.
Declaration
[Tooltip("Sets the distance from the Camera at which the near field blur begins to decrease in intensity.")]
public MinFloatParameter nearFocusStart
Field Value
Type | Description |
---|---|
MinFloatParameter |
Properties
farMaxBlur
Sets the maximum radius the far blur can reach.
Declaration
public float farMaxBlur { get; set; }
Property Value
Type | Description |
---|---|
Single |
farSampleCount
Sets the number of samples to use for the far field.
Declaration
public int farSampleCount { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
highQualityFiltering
When enabled, HDRP uses bicubic filtering instead of bilinear filtering for the depth of field effect.
Declaration
public bool highQualityFiltering { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
nearMaxBlur
Sets the maximum radius the near blur can reach.
Declaration
public float nearMaxBlur { get; set; }
Property Value
Type | Description |
---|---|
Single |
nearSampleCount
Sets the number of samples to use for the near field.
Declaration
public int nearSampleCount { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
physicallyBased
When enabled, HDRP uses a more accurate but slower physically based method to compute the depth of field effect.
Declaration
public bool physicallyBased { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
resolution
Specifies the resolution at which HDRP processes the depth of field effect.
Declaration
public DepthOfFieldResolution resolution { get; set; }
Property Value
Type | Description |
---|---|
DepthOfFieldResolution |
See Also
Methods
IsActive()
Tells if the effect needs to be rendered or not.
Declaration
public bool IsActive()
Returns
Type | Description |
---|---|
Boolean |
|
Implements
IsFarLayerActive()
Returns the state of the far field blur. This is only relevant when Manual is set.
Declaration
public bool IsFarLayerActive()
Returns
Type | Description |
---|---|
Boolean |
|
IsNearLayerActive()
Returns the state of the near field blur. This is only relevant when Manual is set.
Declaration
public bool IsNearLayerActive()
Returns
Type | Description |
---|---|
Boolean |
|