Class RTHandle
A RTHandle is a RenderTexture that scales automatically with the camera size.
This allows proper reutilization of RenderTexture memory when different cameras with various sizes are used during rendering.
RTHandle
Inherited Members
Namespace: UnityEngine .Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public class RTHandle
Properties
Name | Description |
---|---|
is |
Returns true is MSAA is enabled, false otherwise. |
name | Name of the RTHandle |
name |
RenderTargetIdentifier associated with the RTHandle |
reference |
Reference size of the RTHandle System associated with the RTHandle |
rt | RenderTexture associated with the RTHandle |
rt |
Current properties of the RTHandle System. If a custom property has been set through SetCustomHandleProperties method, it will be used that one instead. |
scale |
Scale factor applied to the RTHandle reference size. |
use |
Returns true if the RTHandle uses automatic scaling. |
Methods
Name | Description |
---|---|
Clear |
Method that clears any custom handle property being set. |
Copy |
Switch the render target to fast memory on platform that have it and copies the content. |
Get |
Get the Instance ID of the RTHandle. |
Get |
Return the scaled size of the RTHandle. |
Get |
Return the input size, scaled by the RTHandle scale factor. |
Release() | Release the RTHandle |
Set |
By default, rtHandleProperties gets the global state of scalers against the global reference mode. This method lets the current RTHandle use a local custom RTHandleProperties. This function is being used by scalers such as TAAU and DLSS, which require to have a different resolution for color (independent of the RTHandleSystem). |
Switch |
Switch out the render target from fast memory back to main memory on platforms that have fast memory. |
Switch |
Switch the render target to fast memory on platform that have it. |
Operators
Name | Description |
---|---|
implicit operator Render |
Implicit conversion operator to RenderTexture |
implicit operator Render |
Implicit conversion operator to RenderTargetIdentifier |
implicit operator Texture(RTHandle) | Implicit conversion operator to Texture |