GetTemporaryRT
Add a "get a temporary render texture" command.
Read time 16 minutesLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
Depth buffer bits (0, 16 or 24).
Texture filtering mode (default is Point).
Format of the render texture (default is ARGB32).
Anti-aliasing (default is no anti-aliasing).
Should random-write access into the texture be enabled (default is false).
Render texture memoryless mode.
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
Depth buffer bits (0, 16 or 24).
Texture filtering mode (default is Point).
Format of the render texture (default is ARGB32).
Anti-aliasing (default is no anti-aliasing).
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
Depth buffer bits (0, 16 or 24).
Texture filtering mode (default is Point).
Format of the render texture (default is ARGB32).
Anti-aliasing (default is no anti-aliasing).
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
Depth buffer bits (0, 16 or 24).
Texture filtering mode (default is Point).
Format of the render texture (default is ARGB32).
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
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.
Anti-aliasing (default is no anti-aliasing).
Should random-write access into the texture be enabled (default is false).
Render texture memoryless mode.
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
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.
Anti-aliasing (default is no anti-aliasing).
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
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.
Anti-aliasing (default is no anti-aliasing).
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
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.
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
Shader property name for this texture.
Width in pixels, or -1 for "camera pixel width".
Height in pixels, or -1 for "camera pixel height".
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
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
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
GetTemporaryRT(int, int, int)
Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, int width, int height)
Parameters
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
GetTemporaryRT(int, RenderTextureDescriptor, FilterMode)
Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, RenderTextureDescriptor desc, FilterMode filter)
Parameters
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.
GetTemporaryRT(int, RenderTextureDescriptor)
Add a "get a temporary render texture" command.
public void GetTemporaryRT(int nameID, RenderTextureDescriptor desc)
Parameters
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).
Additional Resources: CommandBuffer.ReleaseTemporaryRT, CommandBuffer.SetRenderTarget, CommandBuffer.Blit.