Class RenderTextureReader
RenderTextureReader reads a RenderTexture from the GPU whenever Capture is called and passes the data back through a provided callback.
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.Utilities
Assembly: Unity.Perception.Runtime.dll
Syntax
[MovedFrom("UnityEngine.Perception.GroundTruth")]
public static class RenderTextureReader
Methods
Capture<T>(CommandBuffer, RenderTexture, Action<int, NativeArray<T>, RenderTexture>)
Reads a RenderTexture from the GPU passes the collected data back through a provided callback.
Declaration
public static void Capture<T>(CommandBuffer cmd, RenderTexture sourceTex, Action<int, NativeArray<T>, RenderTexture> imageReadCallback) where T : struct
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | The CommandBuffer to enqueue the readback operation to. |
RenderTexture | sourceTex | The RenderTexture to readback. |
Action<int, NativeArray<T>, RenderTexture> | imageReadCallback | The callback method to execute once the texture has been readback. |
Type Parameters
Name | Description |
---|---|
T | The type of the raw texture data to be provided. |