# RenderTargetIdentifier

> Creates a render target identifier.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEngine.Rendering](/engine/6000.6/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

## RenderTargetIdentifier(BuiltinRenderTextureType)

Creates a render target identifier.

```csharp
public RenderTargetIdentifier(BuiltinRenderTextureType type)
```

### Parameters

**** (\[BuiltinRenderTextureType]\(/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype)): Built-in temporary render texture type.

### Remarks

Textures can be identified in a number of ways, for example a [RenderTexture](/engine/6000.6/script-reference/unityengine/rendertexture.md) object, or a [Texture](/engine/6000.6/script-reference/unityengine/texture.md) object, or one of built-in render textures ([BuiltinRenderTextureType](/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype.md)), or a temporary render texture with a name (that was created using [CommandBuffer.GetTemporaryRT](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/gettemporaryrt.md)).

RenderTargetIdentifier can be implicitly created from a RenderTexture reference, or a Texture reference, or a BuiltinRenderTextureType, or a name.

A RenderTargetIdentifier created from Texture reference is only valid when passed to [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md)

See Also: [CommandBuffer.SetRenderTarget](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setrendertarget.md), [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md).

## RenderTargetIdentifier(BuiltinRenderTextureType, int, CubemapFace, int)

Creates a render target identifier.

```csharp
public RenderTargetIdentifier(BuiltinRenderTextureType type, int mipLevel = 0, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)
```

### Parameters

**** (\[BuiltinRenderTextureType]\(/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype)): Built-in temporary render texture type.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): MipLevel of the RenderTexture to use.**** (\[CubemapFace]\(/engine/6000.6/script-reference/unityengine/cubemapface)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth slice of the Array RenderTexture to use. The symbolic constant [RenderTargetIdentifier.AllDepthSlices](/engine/6000.6/script-reference/unityengine/rendering/rendertargetidentifier/alldepthslices.md) indicates that all slices should be bound for rendering. The default value is 0.

### Remarks

Textures can be identified in a number of ways, for example a [RenderTexture](/engine/6000.6/script-reference/unityengine/rendertexture.md) object, or a [Texture](/engine/6000.6/script-reference/unityengine/texture.md) object, or one of built-in render textures ([BuiltinRenderTextureType](/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype.md)), or a temporary render texture with a name (that was created using [CommandBuffer.GetTemporaryRT](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/gettemporaryrt.md)).

RenderTargetIdentifier can be implicitly created from a RenderTexture reference, or a Texture reference, or a BuiltinRenderTextureType, or a name.

A RenderTargetIdentifier created from Texture reference is only valid when passed to [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md)

See Also: [CommandBuffer.SetRenderTarget](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setrendertarget.md), [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md).

## RenderTargetIdentifier(string)

Creates a render target identifier.

```csharp
public RenderTargetIdentifier(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Temporary render texture name.

### Remarks

Textures can be identified in a number of ways, for example a [RenderTexture](/engine/6000.6/script-reference/unityengine/rendertexture.md) object, or a [Texture](/engine/6000.6/script-reference/unityengine/texture.md) object, or one of built-in render textures ([BuiltinRenderTextureType](/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype.md)), or a temporary render texture with a name (that was created using [CommandBuffer.GetTemporaryRT](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/gettemporaryrt.md)).

RenderTargetIdentifier can be implicitly created from a RenderTexture reference, or a Texture reference, or a BuiltinRenderTextureType, or a name.

A RenderTargetIdentifier created from Texture reference is only valid when passed to [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md)

See Also: [CommandBuffer.SetRenderTarget](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setrendertarget.md), [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md).

## RenderTargetIdentifier(string, int, CubemapFace, int)

Creates a render target identifier.

```csharp
public RenderTargetIdentifier(string name, int mipLevel = 0, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Temporary render texture name.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): MipLevel of the RenderTexture to use.**** (\[CubemapFace]\(/engine/6000.6/script-reference/unityengine/cubemapface)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth slice of the Array RenderTexture to use. The symbolic constant [RenderTargetIdentifier.AllDepthSlices](/engine/6000.6/script-reference/unityengine/rendering/rendertargetidentifier/alldepthslices.md) indicates that all slices should be bound for rendering. The default value is 0.

### Remarks

Textures can be identified in a number of ways, for example a [RenderTexture](/engine/6000.6/script-reference/unityengine/rendertexture.md) object, or a [Texture](/engine/6000.6/script-reference/unityengine/texture.md) object, or one of built-in render textures ([BuiltinRenderTextureType](/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype.md)), or a temporary render texture with a name (that was created using [CommandBuffer.GetTemporaryRT](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/gettemporaryrt.md)).

RenderTargetIdentifier can be implicitly created from a RenderTexture reference, or a Texture reference, or a BuiltinRenderTextureType, or a name.

A RenderTargetIdentifier created from Texture reference is only valid when passed to [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md)

See Also: [CommandBuffer.SetRenderTarget](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setrendertarget.md), [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md).

## RenderTargetIdentifier(int)

Creates a render target identifier.

```csharp
public RenderTargetIdentifier(int nameID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Temporary render texture name (as integer, see [Shader.PropertyToID](/engine/6000.6/script-reference/unityengine/shader/propertytoid.md)).

### Remarks

Textures can be identified in a number of ways, for example a [RenderTexture](/engine/6000.6/script-reference/unityengine/rendertexture.md) object, or a [Texture](/engine/6000.6/script-reference/unityengine/texture.md) object, or one of built-in render textures ([BuiltinRenderTextureType](/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype.md)), or a temporary render texture with a name (that was created using [CommandBuffer.GetTemporaryRT](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/gettemporaryrt.md)).

RenderTargetIdentifier can be implicitly created from a RenderTexture reference, or a Texture reference, or a BuiltinRenderTextureType, or a name.

A RenderTargetIdentifier created from Texture reference is only valid when passed to [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md)

See Also: [CommandBuffer.SetRenderTarget](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setrendertarget.md), [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md).

## RenderTargetIdentifier(int, int, CubemapFace, int)

Creates a render target identifier.

```csharp
public RenderTargetIdentifier(int nameID, int mipLevel = 0, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Temporary render texture name (as integer, see [Shader.PropertyToID](/engine/6000.6/script-reference/unityengine/shader/propertytoid.md)).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): MipLevel of the RenderTexture to use.**** (\[CubemapFace]\(/engine/6000.6/script-reference/unityengine/cubemapface)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth slice of the Array RenderTexture to use. The symbolic constant [RenderTargetIdentifier.AllDepthSlices](/engine/6000.6/script-reference/unityengine/rendering/rendertargetidentifier/alldepthslices.md) indicates that all slices should be bound for rendering. The default value is 0.

### Remarks

Textures can be identified in a number of ways, for example a [RenderTexture](/engine/6000.6/script-reference/unityengine/rendertexture.md) object, or a [Texture](/engine/6000.6/script-reference/unityengine/texture.md) object, or one of built-in render textures ([BuiltinRenderTextureType](/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype.md)), or a temporary render texture with a name (that was created using [CommandBuffer.GetTemporaryRT](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/gettemporaryrt.md)).

RenderTargetIdentifier can be implicitly created from a RenderTexture reference, or a Texture reference, or a BuiltinRenderTextureType, or a name.

A RenderTargetIdentifier created from Texture reference is only valid when passed to [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md)

See Also: [CommandBuffer.SetRenderTarget](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setrendertarget.md), [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md).

## RenderTargetIdentifier(RenderTargetIdentifier, int, CubemapFace, int)

Creates a render target identifier.

```csharp
public RenderTargetIdentifier(RenderTargetIdentifier renderTargetIdentifier, int mipLevel, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)
```

### Parameters

**** (\[RenderTargetIdentifier]\(/engine/6000.6/script-reference/unityengine/rendering/rendertargetidentifier)): An existing render target identifier.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): MipLevel of the RenderTexture to use.**** (\[CubemapFace]\(/engine/6000.6/script-reference/unityengine/cubemapface)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth slice of the Array RenderTexture to use. The symbolic constant [RenderTargetIdentifier.AllDepthSlices](/engine/6000.6/script-reference/unityengine/rendering/rendertargetidentifier/alldepthslices.md) indicates that all slices should be bound for rendering. The default value is 0.

### Remarks

Textures can be identified in a number of ways, for example a [RenderTexture](/engine/6000.6/script-reference/unityengine/rendertexture.md) object, or a [Texture](/engine/6000.6/script-reference/unityengine/texture.md) object, or one of built-in render textures ([BuiltinRenderTextureType](/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype.md)), or a temporary render texture with a name (that was created using [CommandBuffer.GetTemporaryRT](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/gettemporaryrt.md)).

RenderTargetIdentifier can be implicitly created from a RenderTexture reference, or a Texture reference, or a BuiltinRenderTextureType, or a name.

A RenderTargetIdentifier created from Texture reference is only valid when passed to [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md)

See Also: [CommandBuffer.SetRenderTarget](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setrendertarget.md), [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md).

## RenderTargetIdentifier(Texture)

Creates a render target identifier.

```csharp
public RenderTargetIdentifier(Texture tex)
```

### Parameters

**** (\[Texture]\(/engine/6000.6/script-reference/unityengine/texture)): RenderTexture or Texture object to use.

### Remarks

Textures can be identified in a number of ways, for example a [RenderTexture](/engine/6000.6/script-reference/unityengine/rendertexture.md) object, or a [Texture](/engine/6000.6/script-reference/unityengine/texture.md) object, or one of built-in render textures ([BuiltinRenderTextureType](/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype.md)), or a temporary render texture with a name (that was created using [CommandBuffer.GetTemporaryRT](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/gettemporaryrt.md)).

RenderTargetIdentifier can be implicitly created from a RenderTexture reference, or a Texture reference, or a BuiltinRenderTextureType, or a name.

A RenderTargetIdentifier created from Texture reference is only valid when passed to [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md)

See Also: [CommandBuffer.SetRenderTarget](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setrendertarget.md), [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md).

## RenderTargetIdentifier(Texture, int, CubemapFace, int)

Creates a render target identifier.

```csharp
public RenderTargetIdentifier(Texture tex, int mipLevel = 0, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)
```

### Parameters

**** (\[Texture]\(/engine/6000.6/script-reference/unityengine/texture)): RenderTexture or Texture object to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): MipLevel of the RenderTexture to use.**** (\[CubemapFace]\(/engine/6000.6/script-reference/unityengine/cubemapface)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth slice of the Array RenderTexture to use. The symbolic constant [RenderTargetIdentifier.AllDepthSlices](/engine/6000.6/script-reference/unityengine/rendering/rendertargetidentifier/alldepthslices.md) indicates that all slices should be bound for rendering. The default value is 0.

### Remarks

Textures can be identified in a number of ways, for example a [RenderTexture](/engine/6000.6/script-reference/unityengine/rendertexture.md) object, or a [Texture](/engine/6000.6/script-reference/unityengine/texture.md) object, or one of built-in render textures ([BuiltinRenderTextureType](/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype.md)), or a temporary render texture with a name (that was created using [CommandBuffer.GetTemporaryRT](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/gettemporaryrt.md)).

RenderTargetIdentifier can be implicitly created from a RenderTexture reference, or a Texture reference, or a BuiltinRenderTextureType, or a name.

A RenderTargetIdentifier created from Texture reference is only valid when passed to [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md)

See Also: [CommandBuffer.SetRenderTarget](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setrendertarget.md), [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md).

## RenderTargetIdentifier(RenderBuffer, int, CubemapFace, int)

Creates a render target identifier.

```csharp
public RenderTargetIdentifier(RenderBuffer buf, int mipLevel = 0, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)
```

### Parameters

**** (\[RenderBuffer]\(/engine/6000.6/script-reference/unityengine/renderbuffer)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): MipLevel of the RenderTexture to use.**** (\[CubemapFace]\(/engine/6000.6/script-reference/unityengine/cubemapface)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth slice of the Array RenderTexture to use. The symbolic constant [RenderTargetIdentifier.AllDepthSlices](/engine/6000.6/script-reference/unityengine/rendering/rendertargetidentifier/alldepthslices.md) indicates that all slices should be bound for rendering. The default value is 0.

### Remarks

Textures can be identified in a number of ways, for example a [RenderTexture](/engine/6000.6/script-reference/unityengine/rendertexture.md) object, or a [Texture](/engine/6000.6/script-reference/unityengine/texture.md) object, or one of built-in render textures ([BuiltinRenderTextureType](/engine/6000.6/script-reference/unityengine/rendering/builtinrendertexturetype.md)), or a temporary render texture with a name (that was created using [CommandBuffer.GetTemporaryRT](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/gettemporaryrt.md)).

RenderTargetIdentifier can be implicitly created from a RenderTexture reference, or a Texture reference, or a BuiltinRenderTextureType, or a name.

A RenderTargetIdentifier created from Texture reference is only valid when passed to [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md)

See Also: [CommandBuffer.SetRenderTarget](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setrendertarget.md), [CommandBuffer.SetGlobalTexture](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobaltexture.md).
