Class ComputeBufferReader
A utility for retrieving compute buffer data from the GPU.
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.Utilities
Assembly: Unity.Perception.Runtime.dll
Syntax
[MovedFrom("UnityEngine.Perception.GroundTruth")]
public static class ComputeBufferReader
Methods
Capture<T>(CommandBuffer, ComputeBuffer, Action<int, NativeArray<T>>)
Reads a ComputeBuffer from the GPU and passes the collected data back through a provided callback.
Declaration
public static void Capture<T>(CommandBuffer cmd, ComputeBuffer buffer, Action<int, NativeArray<T>> imageReadCallback) where T : struct
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | |
ComputeBuffer | buffer | |
Action<int, NativeArray<T>> | imageReadCallback |
Type Parameters
Name | Description |
---|---|
T | The type of the raw texture data to be provided. |