Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RenderTargetIdentifier

Creates a render target identifier.
Read time 7 minutesLast updated 6 days ago

Definition

RenderTargetIdentifier(BuiltinRenderTextureType)

Creates a render target identifier.
public RenderTargetIdentifier(BuiltinRenderTextureType type)

Parameters

Built-in temporary render texture type.

Remarks

Textures can be identified in a number of ways, for example a RenderTexture object, or a Texture object, or one of built-in render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using CommandBuffer.GetTemporaryRT).
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

RenderTargetIdentifier(BuiltinRenderTextureType, int, CubemapFace, int)

Creates a render target identifier.
public RenderTargetIdentifier(BuiltinRenderTextureType type, int mipLevel = 0, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)

Parameters

Built-in temporary render texture type.

mipLevel

MipLevel of the RenderTexture to use.

cubeFace


depthSlice

Depth slice of the Array RenderTexture to use. The symbolic constant RenderTargetIdentifier.AllDepthSlices 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 object, or a Texture object, or one of built-in render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using CommandBuffer.GetTemporaryRT).
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

RenderTargetIdentifier(string)

Creates a render target identifier.
public RenderTargetIdentifier(string name)

Parameters

name

Temporary render texture name.

Remarks

Textures can be identified in a number of ways, for example a RenderTexture object, or a Texture object, or one of built-in render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using CommandBuffer.GetTemporaryRT).
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

RenderTargetIdentifier(string, int, CubemapFace, int)

Creates a render target identifier.
public RenderTargetIdentifier(string name, int mipLevel = 0, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)

Parameters

name

Temporary render texture name.

mipLevel

MipLevel of the RenderTexture to use.

cubeFace


depthSlice

Depth slice of the Array RenderTexture to use. The symbolic constant RenderTargetIdentifier.AllDepthSlices 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 object, or a Texture object, or one of built-in render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using CommandBuffer.GetTemporaryRT).
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

RenderTargetIdentifier(int)

Creates a render target identifier.
public RenderTargetIdentifier(int nameID)

Parameters

nameID

Temporary render texture name (as integer, see Shader.PropertyToID).

Remarks

Textures can be identified in a number of ways, for example a RenderTexture object, or a Texture object, or one of built-in render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using CommandBuffer.GetTemporaryRT).
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

RenderTargetIdentifier(int, int, CubemapFace, int)

Creates a render target identifier.
public RenderTargetIdentifier(int nameID, int mipLevel = 0, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)

Parameters

nameID

Temporary render texture name (as integer, see Shader.PropertyToID).

mipLevel

MipLevel of the RenderTexture to use.

cubeFace


depthSlice

Depth slice of the Array RenderTexture to use. The symbolic constant RenderTargetIdentifier.AllDepthSlices 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 object, or a Texture object, or one of built-in render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using CommandBuffer.GetTemporaryRT).
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

RenderTargetIdentifier(RenderTargetIdentifier, int, CubemapFace, int)

Creates a render target identifier.
public RenderTargetIdentifier(RenderTargetIdentifier renderTargetIdentifier, int mipLevel, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)

Parameters

renderTargetIdentifier

An existing render target identifier.

mipLevel

MipLevel of the RenderTexture to use.

cubeFace


depthSlice

Depth slice of the Array RenderTexture to use. The symbolic constant RenderTargetIdentifier.AllDepthSlices 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 object, or a Texture object, or one of built-in render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using CommandBuffer.GetTemporaryRT).
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

RenderTargetIdentifier(Texture)

Creates a render target identifier.
public RenderTargetIdentifier(Texture tex)

Parameters

RenderTexture or Texture object to use.

Remarks

Textures can be identified in a number of ways, for example a RenderTexture object, or a Texture object, or one of built-in render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using CommandBuffer.GetTemporaryRT).
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

RenderTargetIdentifier(Texture, int, CubemapFace, int)

Creates a render target identifier.
public RenderTargetIdentifier(Texture tex, int mipLevel = 0, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)

Parameters

RenderTexture or Texture object to use.

mipLevel

MipLevel of the RenderTexture to use.

cubeFace


depthSlice

Depth slice of the Array RenderTexture to use. The symbolic constant RenderTargetIdentifier.AllDepthSlices 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 object, or a Texture object, or one of built-in render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using CommandBuffer.GetTemporaryRT).
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

RenderTargetIdentifier(RenderBuffer, int, CubemapFace, int)

Creates a render target identifier.
public RenderTargetIdentifier(RenderBuffer buf, int mipLevel = 0, CubemapFace cubeFace = CubemapFace.Unknown, int depthSlice = 0)

Parameters


mipLevel

MipLevel of the RenderTexture to use.

cubeFace


depthSlice

Depth slice of the Array RenderTexture to use. The symbolic constant RenderTargetIdentifier.AllDepthSlices 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 object, or a Texture object, or one of built-in render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using CommandBuffer.GetTemporaryRT).
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