docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class VolumeStack

    Represents the state of a Volume blending update within the Volume system.

    Inheritance
    object
    VolumeStack
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public sealed class VolumeStack : IDisposable
    Remarks

    This class is responsible for storing the blending of Volume components across multiple scenes and cameras, By default, a global volume stack is provided by the VolumeManager to handle the blending of Volume data across your project. This global stack simplifies managing and blending volume data at a project-wide level. However, if you require more granular control over the blending process or want to store and manage the blending results separately (e.g., per camera or scene), you can create custom volume stacks using CreateStack(). The blending of volumes is based on a combination of several factors:

    • Volume Weight: Determines how strongly a particular volume influences the final result.
    • Volume Parameters: These can be visual settings such as post-processing effects, lighting adjustments, or other specialized effects defined in the Volume components.
    • Camera Volume Stack: Volume blending can vary per camera, allowing different volumes to be blended for different camera views or scenes.

    While the default global volume stack works for most use cases, custom stacks provide greater flexibility and control, allowing developers to manage and store volume blending results at a per-scene or per-camera level. This can be particularly useful in complex rendering setups or when you want to apply different volume blends for different gameplay contexts or visual effects.

    Keep in mind that frequent updates to the volume blending process (e.g., every frame) may have an impact on performance, especially when dealing with large numbers of volumes or complex blending operations.

    Properties

    isValid

    Check if the stack is in valid state and can be used.

    Declaration
    public bool isValid { get; }
    Property Value
    Type Description
    bool
    See Also
    Volume
    VolumeProfile
    VolumeComponent
    VolumeParameter

    Methods

    Dispose()

    Cleans up the content of this stack. Once a VolumeStack is disposed, it shouldn't be used anymore.

    Declaration
    public void Dispose()
    See Also
    Volume
    VolumeProfile
    VolumeComponent
    VolumeParameter

    GetComponent(Type)

    Gets the current state of the VolumeComponent of the specified type in the stack.

    Declaration
    public VolumeComponent GetComponent(Type type)
    Parameters
    Type Name Description
    Type type

    The type of VolumeComponent to look for.

    Returns
    Type Description
    VolumeComponent

    The current state of the VolumeComponent of the specified type, or null if the type is invalid.

    See Also
    Volume
    VolumeProfile
    VolumeComponent
    VolumeParameter

    GetComponent<T>()

    Gets the current state of the VolumeComponent of type T in the stack.

    Declaration
    public T GetComponent<T>() where T : VolumeComponent
    Returns
    Type Description
    T

    The current state of the VolumeComponent of type T in the stack.

    Type Parameters
    Name Description
    T

    A type of VolumeComponent.

    See Also
    Volume
    VolumeProfile
    VolumeComponent
    VolumeParameter

    Implements

    IDisposable

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)

    See Also

    Volume
    VolumeProfile
    VolumeComponent
    VolumeParameter
    In This Article
    Back to top
    Copyright © 2025 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)