docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Fog

    Fog Volume Component.

    Inheritance
    object
    Object
    ScriptableObject
    VolumeComponent
    VolumeComponentWithQuality
    Fog
    Implements
    IApplyRevertPropertyContextMenuItemProvider
    Inherited Members
    VolumeComponentWithQuality.quality
    VolumeComponentWithQuality.UsesQualitySettings()
    VolumeComponent.active
    VolumeComponent.displayName
    VolumeComponent.parameters
    VolumeComponent.OnEnable()
    VolumeComponent.OnDisable()
    VolumeComponent.Override(VolumeComponent, float)
    VolumeComponent.SetAllOverridesTo(bool)
    VolumeComponent.GetHashCode()
    VolumeComponent.AnyPropertiesIsOverridden()
    VolumeComponent.OnDestroy()
    VolumeComponent.Release()
    VolumeComponent.TryGetRevertMethodForFieldName(SerializedProperty, out Action<SerializedProperty>)
    VolumeComponent.GetSourceTerm()
    VolumeComponent.TryGetApplyMethodForFieldName(SerializedProperty, out Action<SerializedProperty>)
    VolumeComponent.GetSourceName(Component)
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
    Syntax
    [Serializable]
    [VolumeComponentMenu("Fog")]
    [SupportedOnRenderPipeline(typeof(HDRenderPipelineAsset))]
    public class Fog : VolumeComponentWithQuality, IApplyRevertPropertyContextMenuItemProvider

    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
    [Tooltip("Controls the angular distribution of scattered light. 0 is isotropic, 1 is forward scattering, and -1 is backward scattering.")]
    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
    [Tooltip("Specifies the constant color of the fog.")]
    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
    [Tooltip("Specifies the denoising technique to use for the volumetric effect.")]
    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
    [Tooltip("When enabled, HDRP only includes directional Lights when it evaluates volumetric fog.")]
    public BoolParameter directionalLightsOnly
    Field Value
    Type Description
    BoolParameter

    enableVolumetricFog

    Enable volumetric fog.

    Declaration
    public BoolParameter enableVolumetricFog
    Field Value
    Type Description
    BoolParameter

    enabled

    Enable fog.

    Declaration
    [Tooltip("Enables the fog.")]
    public BoolParameter enabled
    Field Value
    Type Description
    BoolParameter

    globalLightProbeDimmer

    Multiplier for global illumination (APV or ambient probe).

    Declaration
    public ClampedFloatParameter globalLightProbeDimmer
    Field Value
    Type Description
    ClampedFloatParameter

    m_ResolutionDepthRatio

    Controls how Unity shares resources between Screen (XY) and Depth (Z) resolutions.

    Declaration
    [SerializeField]
    [FormerlySerializedAs("resolutionDepthRatio")]
    [Tooltip("Controls how Unity shares resources between Screen (x-axis and y-axis) and Depth (z-axis) resolutions.")]
    public ClampedFloatParameter m_ResolutionDepthRatio
    Field Value
    Type Description
    ClampedFloatParameter

    maxFogDistance

    Maximum fog distance.

    Declaration
    [Tooltip("Sets the maximum fog distance HDRP uses when it shades the skybox or the Far Clipping Plane of the Camera.")]
    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
    [Tooltip("Sets the distance at which HDRP uses the maximum mip image of the blurred sky texture as the fog color.")]
    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
    [Tooltip("Controls the maximum mip map HDRP uses for mip fog (0 is the lowest mip and 1 is the highest mip).")]
    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
    [Tooltip("Sets the distance at which HDRP uses the minimum mip image of the blurred sky texture as the fog color.")]
    public MinFloatParameter mipFogNear
    Field Value
    Type Description
    MinFloatParameter

    multipleScatteringIntensity

    Controls how much the multiple-scattering will affect the scene. Directly controls the amount of blur depending on the fog density.

    Declaration
    [Tooltip("Use this value to simulate multiple scattering when combining the fog with the scene color.")]
    public ClampedFloatParameter multipleScatteringIntensity
    Field Value
    Type Description
    ClampedFloatParameter

    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
    [Tooltip("Controls the resolution of the volumetric buffer (3D texture) along the x-axis and y-axis relative to the resolution of the screen.")]
    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
    [Tooltip("Controls the distribution of slices along the Camera's focal axis. 0 is exponential distribution and 1 is linear distribution.")]
    public ClampedFloatParameter sliceDistributionUniformity
    Field Value
    Type Description
    ClampedFloatParameter

    tint

    Specifies the tint of the fog when using Sky Color.

    Declaration
    [Tooltip("Specifies the tint of the fog.")]
    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
    [Tooltip("Controls the number of slices to use the volumetric buffer (3D texture) along the camera's focal axis.")]
    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

    Controls how Unity shares resources between Screen (XY) and Depth (Z) resolutions.

    Declaration
    public float resolutionDepthRatio { get; set; }
    Property Value
    Type Description
    float
    Remarks

    A value of 0 means Unity allocates all of the resources to the XY resolution, which reduces aliasing, but increases noise. A value of 1 means Unity allocates all of the resources to the Z resolution, which reduces noise, but increases aliasing. This property allows for linear interpolation between the two configurations.

    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
    float
    Remarks

    Try to minimize this value to find a compromise between quality and performance.

    Implements

    IApplyRevertPropertyContextMenuItemProvider
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)