Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetTemporaryRT

Add a "get a temporary render texture" command.
Read time 16 minutesLast updated 5 days ago

Definition

GetTemporaryRT(int, int, int, int, FilterMode, GraphicsFormat, int, bool, RenderTextureMemoryless, bool)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, GraphicsFormat format, int antiAliasing, bool enableRandomWrite, RenderTextureMemoryless memorylessMode, bool useDynamicScale)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

antiAliasing

Anti-aliasing (default is no anti-aliasing).

enableRandomWrite

Should random-write access into the texture be enabled (default is false).

Render texture memoryless mode.

useDynamicScale

Whether to enable DynamicResolution for the texture.

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode, GraphicsFormat, int, bool, RenderTextureMemoryless)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, GraphicsFormat format, int antiAliasing, bool enableRandomWrite, RenderTextureMemoryless memorylessMode)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

antiAliasing

Anti-aliasing (default is no anti-aliasing).

enableRandomWrite

Should random-write access into the texture be enabled (default is false).

Render texture memoryless mode.

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode, GraphicsFormat, int, bool)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, GraphicsFormat format, int antiAliasing, bool enableRandomWrite)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

antiAliasing

Anti-aliasing (default is no anti-aliasing).

enableRandomWrite

Should random-write access into the texture be enabled (default is false).

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode, GraphicsFormat, int)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, GraphicsFormat format, int antiAliasing)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

antiAliasing

Anti-aliasing (default is no anti-aliasing).

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode, GraphicsFormat)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, GraphicsFormat format)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode, RenderTextureFormat, RenderTextureReadWrite, int, bool, RenderTextureMemoryless, bool)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, RenderTextureFormat format, RenderTextureReadWrite readWrite, int antiAliasing, bool enableRandomWrite, RenderTextureMemoryless memorylessMode, bool useDynamicScale)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

Color space conversion mode.

antiAliasing

Anti-aliasing (default is no anti-aliasing).

enableRandomWrite

Should random-write access into the texture be enabled (default is false).

Render texture memoryless mode.

useDynamicScale

Whether to enable DynamicResolution for the texture.

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode, RenderTextureFormat, RenderTextureReadWrite, int, bool, RenderTextureMemoryless)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, RenderTextureFormat format, RenderTextureReadWrite readWrite, int antiAliasing, bool enableRandomWrite, RenderTextureMemoryless memorylessMode)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

Color space conversion mode.

antiAliasing

Anti-aliasing (default is no anti-aliasing).

enableRandomWrite

Should random-write access into the texture be enabled (default is false).

Render texture memoryless mode.

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode, RenderTextureFormat, RenderTextureReadWrite, int, bool)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, RenderTextureFormat format, RenderTextureReadWrite readWrite, int antiAliasing, bool enableRandomWrite)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

Color space conversion mode.

antiAliasing

Anti-aliasing (default is no anti-aliasing).

enableRandomWrite

Should random-write access into the texture be enabled (default is false).

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode, RenderTextureFormat, RenderTextureReadWrite, int)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, RenderTextureFormat format, RenderTextureReadWrite readWrite, int antiAliasing)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

Color space conversion mode.

antiAliasing

Anti-aliasing (default is no anti-aliasing).

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode, RenderTextureFormat, RenderTextureReadWrite)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, RenderTextureFormat format, RenderTextureReadWrite readWrite)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

Color space conversion mode.

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode, RenderTextureFormat)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter, RenderTextureFormat format)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Format of the render texture (default is ARGB32).

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int, FilterMode)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer, FilterMode filter)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Texture filtering mode (default is Point).

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int, int)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height, int depthBuffer)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

depthBuffer

Depth buffer bits (0, 16 or 24).

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, int, int)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height)

Parameters

nameID

Shader property name for this texture.

width

Width in pixels, or -1 for "camera pixel width".

height

Height in pixels, or -1 for "camera pixel height".

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, RenderTextureDescriptor, FilterMode)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, RenderTextureDescriptor desc, FilterMode filter)

Parameters

nameID

Shader property name for this texture.

Use this RenderTextureDescriptor for the settings when creating the temporary RenderTexture.

Texture filtering mode (default is Point).

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).

GetTemporaryRT(int, RenderTextureDescriptor)

Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, RenderTextureDescriptor desc)

Parameters

nameID

Shader property name for this texture.

Use this RenderTextureDescriptor for the settings when creating the temporary RenderTexture.

Remarks

This creates a temporary render texture with given parameters, and sets it up as a global shader property with nameID. Use Shader.PropertyToID to create the integer name.
Release the temporary render texture using CommandBuffer.ReleaseTemporaryRT, passing the same nameID. Any temporary textures that were not explicitly released will be removed after camera is done rendering, or after Graphics.ExecuteCommandBuffer is done.
After getting a temporary render texture, you can set it as active (CommandBuffer.SetRenderTarget) or blit to/from it (CommandBuffer.Blit). You do not explicitly need to preserve active render targets during command buffer execution (current render targets are saved & restored afterwards).