Class TextureXR
Utility class providing default textures compatible in any XR setup.
Namespace: UnityEngine.Rendering
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 |
---|---|
Int32 |
slices
Number of slices used by the XR system.
Declaration
public static int slices { get; }
Property Value
Type | Description |
---|---|
Int32 |
useTexArray
Returns true if the XR system uses texture arrays.
Declaration
public static bool useTexArray { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
GetBlackTexture()
Default black texture.
Declaration
public static RTHandle GetBlackTexture()
Returns
Type | Description |
---|---|
RTHandle | The default black texture. |
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. |