Class Fog
Fog Volume Component.
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Syntax
public class Fog : VolumeComponentWithQuality
Fields
albedo
Stores the fog albedo. This defines the color of the fog.
Declaration
public ColorParameter albedo
Field Value
Type | Description |
---|---|
ColorParameter |
anisotropy
Controls the angular distribution of scattered light. 0 is isotropic, 1 is forward scattering, and -1 is backward scattering.
Declaration
public ClampedFloatParameter anisotropy
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
baseHeight
Height fog base height.
Declaration
public FloatParameter baseHeight
Field Value
Type | Description |
---|---|
FloatParameter |
color
Fog color.
Declaration
public ColorParameter color
Field Value
Type | Description |
---|---|
ColorParameter |
colorMode
Fog color mode.
Declaration
public FogColorParameter colorMode
Field Value
Type | Description |
---|---|
FogColorParameter |
denoisingMode
Controls which denoising technique to use for the volumetric effect.
Declaration
public FogDenoisingModeParameter denoisingMode
Field Value
Type | Description |
---|---|
FogDenoisingModeParameter |
Remarks
Reprojection mode is effective for static lighting but can lead to severe ghosting artifacts with highly dynamic lighting. Gaussian mode is effective with dynamic lighting. You can also use both modes together which produces high-quality results, but increases the resource intensity of processing the effect.
depthExtent
Sets the distance (in meters) from the Camera's Near Clipping Plane to the back of the Camera's volumetric lighting buffer. The lower the distance is, the higher the fog quality is.
Declaration
public MinFloatParameter depthExtent
Field Value
Type | Description |
---|---|
MinFloatParameter |
directionalLightsOnly
Indicates whether Unity includes or excludes non-directional light types when it evaluates the volumetric fog. Including non-directional lights increases the resource intensity of the effect.
Declaration
public BoolParameter directionalLightsOnly
Field Value
Type | Description |
---|---|
BoolParameter |
enabled
Enable fog.
Declaration
public BoolParameter enabled
Field Value
Type | Description |
---|---|
BoolParameter |
enableVolumetricFog
Enable volumetric fog.
Declaration
public BoolParameter enableVolumetricFog
Field Value
Type | Description |
---|---|
BoolParameter |
filter
Deprecated don't used
Declaration
public BoolParameter filter
Field Value
Type | Description |
---|---|
BoolParameter |
globalLightProbeDimmer
Multiplier for ambient probe contribution.
Declaration
public ClampedFloatParameter globalLightProbeDimmer
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
m_ResolutionDepthRatio
Declaration
public ClampedFloatParameter m_ResolutionDepthRatio
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
maxFogDistance
Maximum fog distance.
Declaration
public MinFloatParameter maxFogDistance
Field Value
Type | Description |
---|---|
MinFloatParameter |
maximumHeight
Height fog maximum height.
Declaration
public FloatParameter maximumHeight
Field Value
Type | Description |
---|---|
FloatParameter |
meanFreePath
Fog mean free path.
Declaration
public MinFloatParameter meanFreePath
Field Value
Type | Description |
---|---|
MinFloatParameter |
mipFogFar
Sets the distance at which HDRP uses the maximum mip image of the blurred sky texture as the fog color.
Declaration
public MinFloatParameter mipFogFar
Field Value
Type | Description |
---|---|
MinFloatParameter |
mipFogMaxMip
Controls the maximum mip map HDRP uses for mip fog (0 is the lowest mip and 1 is the highest mip).
Declaration
public ClampedFloatParameter mipFogMaxMip
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
mipFogNear
Sets the distance at which HDRP uses the minimum mip image of the blurred sky texture as the fog color.
Declaration
public MinFloatParameter mipFogNear
Field Value
Type | Description |
---|---|
MinFloatParameter |
screenResolutionPercentage
Stores the resolution of the volumetric buffer (3D texture) along the x-axis and y-axis relative to the resolution of the screen.
Declaration
public ClampedFloatParameter screenResolutionPercentage
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
sliceDistributionUniformity
Controls the distribution of slices along the Camera's focal axis. 0 is exponential distribution and 1 is linear distribution.
Declaration
public ClampedFloatParameter sliceDistributionUniformity
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
tint
Specifies the tint of the fog when using Sky Color.
Declaration
public ColorParameter tint
Field Value
Type | Description |
---|---|
ColorParameter |
volumeSliceCount
Number of slices of the volumetric buffer (3D texture) along the camera's focal axis.
Declaration
public ClampedIntParameter volumeSliceCount
Field Value
Type | Description |
---|---|
ClampedIntParameter |
Properties
fogControlMode
Controls which method to use to control the performance and quality of the volumetric fog.
Declaration
public FogControl fogControlMode { get; set; }
Property Value
Type | Description |
---|---|
FogControl |
Remarks
Balance mode allows you to use a performance-oriented approach to define the quality of the volumetric fog. Manual mode gives you access to the internal set of properties which directly control the effect.
resolutionDepthRatio
Declaration
public float resolutionDepthRatio { get; set; }
Property Value
Type | Description |
---|---|
Single |
volumetricFogBudget
Defines the performance to quality ratio of the volumetric fog. A value of 0 being the least resource-intensive and a value of 1 being the highest quality.
Declaration
public float volumetricFogBudget { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Try to minimize this value to find a compromise between quality and performance.