docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BufferedRTHandleSystem

    Implement a multiple buffering for RenderTextures.

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

    Properties

    maxHeight

    Maximum allocated height of the Buffered RTHandle System

    Declaration
    public int maxHeight { get; }
    Property Value
    Type Description
    int

    maxWidth

    Maximum allocated width of the Buffered RTHandle System

    Declaration
    public int maxWidth { get; }
    Property Value
    Type Description
    int

    rtHandleProperties

    Current properties of the Buffered RTHandle System

    Declaration
    public RTHandleProperties rtHandleProperties { get; }
    Property Value
    Type Description
    RTHandleProperties

    Methods

    AllocBuffer(int, Func<RTHandleSystem, int, RTHandle>, int)

    Allocate RT handles for a buffer.

    Declaration
    public void AllocBuffer(int bufferId, Func<RTHandleSystem, int, RTHandle> allocator, int bufferCount)
    Parameters
    Type Name Description
    int bufferId

    The buffer to allocate.

    Func<RTHandleSystem, int, RTHandle> allocator

    The functor to use for allocation.

    int bufferCount

    The number of RT handles for this buffer.

    CalculateRatioAgainstMaxSize(int, int)

    Returns the ratio against the current target's max resolution

    Declaration
    public Vector2 CalculateRatioAgainstMaxSize(int width, int height)
    Parameters
    Type Name Description
    int width

    width to utilize

    int height

    height to utilize

    Returns
    Type Description
    Vector2

    retruns the width,height / maxTargetSize.xy ratio.

    Dispose()

    Dispose implementation

    Declaration
    public void Dispose()

    GetFrameRT(int, int)

    Return the frame RT or null.

    Declaration
    public RTHandle GetFrameRT(int bufferId, int frameIndex)
    Parameters
    Type Name Description
    int bufferId

    Defines the buffer to use.

    int frameIndex
    Returns
    Type Description
    RTHandle

    The frame RT or null when the bufferId was not previously allocated (AllocBuffer(int, Func<RTHandleSystem, int, RTHandle>, int)).

    GetNumFramesAllocated(int)

    Queries the number of RT handle buffers allocated for a buffer ID.

    Declaration
    public int GetNumFramesAllocated(int bufferId)
    Parameters
    Type Name Description
    int bufferId

    The buffer ID to query.

    Returns
    Type Description
    int

    The num of frames allocated

    ReleaseAll()

    Deallocate and clear all buffers.

    Declaration
    public void ReleaseAll()

    ReleaseBuffer(int)

    Release a buffer

    Declaration
    public void ReleaseBuffer(int bufferId)
    Parameters
    Type Name Description
    int bufferId

    Id of the buffer that needs to be released.

    ResetReferenceSize(int, int)

    Reset the reference size of the system and reallocate all textures.

    Declaration
    public void ResetReferenceSize(int width, int height)
    Parameters
    Type Name Description
    int width

    New width.

    int height

    New height.

    SwapAndSetReferenceSize(int, int)

    Swap buffers Set the reference size for this RT Handle System (SetReferenceSize(int, int, bool))

    Declaration
    public void SwapAndSetReferenceSize(int width, int height)
    Parameters
    Type Name Description
    int width

    The width of the RTs of this buffer.

    int height

    The height of the RTs of this buffer.

    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, bool)
    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)