docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TextureXR

    Utility class providing default textures compatible in any XR setup.

    Inheritance
    object
    TextureXR
    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 static class TextureXR

    Properties

    dimension

    Dimension of XR textures.

    Declaration
    public static TextureDimension dimension { get; }
    Property Value
    Type Description
    TextureDimension

    maxViews

    Maximum number of views handled by the XR system.

    Declaration
    public static int maxViews { set; }
    Property Value
    Type Description
    int

    slices

    Number of slices used by the XR system.

    Declaration
    public static int slices { get; }
    Property Value
    Type Description
    int

    useTexArray

    Returns true if the XR system uses texture arrays.

    Declaration
    public static bool useTexArray { get; }
    Property Value
    Type Description
    bool

    Methods

    GetBlackTexture()

    Default black texture.

    Declaration
    public static RTHandle GetBlackTexture()
    Returns
    Type Description
    RTHandle

    The default black texture.

    GetBlackTexture3D()

    Default black texture 3D.

    Declaration
    public static RTHandle GetBlackTexture3D()
    Returns
    Type Description
    RTHandle

    The default black texture 3D.

    GetBlackTextureArray()

    Default black texture array.

    Declaration
    public static RTHandle GetBlackTextureArray()
    Returns
    Type Description
    RTHandle

    The default black texture array.

    GetBlackUIntTexture()

    Default black unsigned integer texture.

    Declaration
    public static RTHandle GetBlackUIntTexture()
    Returns
    Type Description
    RTHandle

    The default black unsigned integer texture.

    GetClearTexture()

    Default clear color (0, 0, 0, 1) texture.

    Declaration
    public static RTHandle GetClearTexture()
    Returns
    Type Description
    RTHandle

    The default clear color texture.

    GetMagentaTexture()

    Default magenta texture.

    Declaration
    public static RTHandle GetMagentaTexture()
    Returns
    Type Description
    RTHandle

    The default magenta texture.

    GetWhiteTexture()

    Default white texture.

    Declaration
    public static RTHandle GetWhiteTexture()
    Returns
    Type Description
    RTHandle

    The default white texture.

    Initialize(CommandBuffer, ComputeShader)

    Initialize XR textures. Must be called at least once.

    Declaration
    public static void Initialize(CommandBuffer cmd, ComputeShader clearR32_UIntShader)
    Parameters
    Type Name Description
    CommandBuffer cmd

    Command Buffer used to initialize textures.

    ComputeShader clearR32_UIntShader

    Compute shader used to intitialize unsigned integer textures.

    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)