docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Enum UnityXRDepthTextureFormat

    Precision of depth texture.

    Namespace: UnityEngine.XR.OpenXR.API
    Assembly: Unity.XR.OpenXR.dll
    Syntax
    public enum UnityXRDepthTextureFormat

    Fields

    Name Description
    kUnityXRDepthTextureFormat16bit

    If possible, use a 16-bit texture format to save bandwidth. DX11: DXGI_FORMAT_D16_UNORM DX12: DXGI_FORMAT_D16_UNORM Vulkan: VK_FORMAT_D16_UNORM OpenGL: Unsupported

    kUnityXRDepthTextureFormat24bitOrGreater

    24-bit or greater depth texture. Unity prefers 32 bit floating point Z buffer if available on the platform. DX11: DXGI_FORMAT_D32_FLOAT_S8X24_UINT DX12: DXGI_FORMAT_D32_FLOAT_S8X24_UINT Vulkan: VK_FORMAT_D24_UNORM_S8_UINT OpenGL: Unsupported

    kUnityXRDepthTextureFormatNone

    No depth texture.

    kUnityXRDepthTextureFormatReference

    Don't create a depth texture, instead create a reference to another depth texture that's already been created. Must fill out UnityTextureData::referenceTextureId. This is useful for sharing a single depth texture between double/triple buffered color textures (of the same width/height).

    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)