Class RTHandle | Core RP Library | 9.0.0-preview.77
docs.unity3d.com
    Show / Hide Table of Contents

    Class RTHandle

    A RTHandle is a RenderTexture that scales automatically with the camera size. This allows proper reutilization of RenderTexture memory when different cameras with various sizes are used during rendering. RTHandleSystem

    Inheritance
    Object
    RTHandle
    Namespace: UnityEngine.Rendering
    Syntax
    public class RTHandle

    Properties

    isMSAAEnabled

    Returns true is MSAA is enabled, false otherwise.

    Declaration
    public bool isMSAAEnabled { get; }
    Property Value
    Type Description
    Boolean

    name

    Name of the RTHandle

    Declaration
    public string name { get; }
    Property Value
    Type Description
    String

    nameID

    RenderTargetIdentifier associated with the RTHandle

    Declaration
    public RenderTargetIdentifier nameID { get; }
    Property Value
    Type Description
    RenderTargetIdentifier

    referenceSize

    Reference size of the RTHandle System associated with the RTHandle

    Declaration
    public Vector2Int referenceSize { get; }
    Property Value
    Type Description
    Vector2Int

    rt

    RenderTexture associated with the RTHandle

    Declaration
    public RenderTexture rt { get; }
    Property Value
    Type Description
    RenderTexture

    rtHandleProperties

    Current properties of the RTHandle System

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

    scaleFactor

    Scale factor applied to the RTHandle reference size.

    Declaration
    public Vector2 scaleFactor { get; }
    Property Value
    Type Description
    Vector2

    useScaling

    Returns true if the RTHandle uses automatic scaling.

    Declaration
    public bool useScaling { get; }
    Property Value
    Type Description
    Boolean

    Methods

    GetScaledSize(Vector2Int)

    Return the input size, scaled by the RTHandle scale factor.

    Declaration
    public Vector2Int GetScaledSize(Vector2Int refSize)
    Parameters
    Type Name Description
    Vector2Int refSize

    Input size

    Returns
    Type Description
    Vector2Int

    Input size scaled by the RTHandle scale factor.

    Release()

    Release the RTHandle

    Declaration
    public void Release()

    Operators

    Implicit(RTHandle to RenderTargetIdentifier)

    Implicit conversion operator to RenderTargetIdentifier

    Declaration
    public static implicit operator RenderTargetIdentifier(RTHandle handle)
    Parameters
    Type Name Description
    RTHandle handle

    Input RTHandle

    Returns
    Type Description
    RenderTargetIdentifier

    RenderTargetIdentifier representation of the RTHandle.

    Implicit(RTHandle to RenderTexture)

    Implicit conversion operator to RenderTexture

    Declaration
    public static implicit operator RenderTexture(RTHandle handle)
    Parameters
    Type Name Description
    RTHandle handle

    Input RTHandle

    Returns
    Type Description
    RenderTexture

    RenderTexture representation of the RTHandle.

    Implicit(RTHandle to Texture)

    Implicit conversion operator to Texture

    Declaration
    public static implicit operator Texture(RTHandle handle)
    Parameters
    Type Name Description
    RTHandle handle

    Input RTHandle

    Returns
    Type Description
    Texture

    Texture representation of the RTHandle.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023