RequestAsync
Retrieves data asynchronously from a GPU resource.
Read time 5 minutesLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
RequestAsync(ComputeBuffer)
Retrieves data asynchronously from a GPU resource.
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(ComputeBuffer src)
Parameters
Resource to read the data from.
Returns
Type | Description |
|---|---|
| Awaitable<AsyncGPUReadbackRequest> |
Remarks
RequestAsync(ComputeBuffer, int, int)
Retrieves data asynchronously from a GPU resource.
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(ComputeBuffer src, int size, int offset)
Parameters
Resource to read the data from.
Size in bytes of the data to be retrieved from the ComputeBuffer or GraphicsBuffer.
Offset in bytes in the ComputeBuffer or GraphicsBuffer.
Returns
Type | Description |
|---|---|
| Awaitable<AsyncGPUReadbackRequest> |
Remarks
RequestAsync(GraphicsBuffer)
Retrieves data asynchronously from a GPU resource.
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(GraphicsBuffer src)
Parameters
Resource to read the data from.
Returns
Type | Description |
|---|---|
| Awaitable<AsyncGPUReadbackRequest> |
Remarks
RequestAsync(GraphicsBuffer, int, int)
Retrieves data asynchronously from a GPU resource.
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(GraphicsBuffer src, int size, int offset)
Parameters
Resource to read the data from.
Size in bytes of the data to be retrieved from the ComputeBuffer or GraphicsBuffer.
Offset in bytes in the ComputeBuffer or GraphicsBuffer.
Returns
Type | Description |
|---|---|
| Awaitable<AsyncGPUReadbackRequest> |
Remarks
RequestAsync(Texture, int)
Retrieves data asynchronously from a GPU resource.
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex = 0)
Parameters
Returns
Type | Description |
|---|---|
| Awaitable<AsyncGPUReadbackRequest> |
Remarks
RequestAsync(Texture, int, TextureFormat)
Retrieves data asynchronously from a GPU resource.
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex, TextureFormat dstFormat)
Parameters
Resource to read the data from.
Index of the mipmap to be fetched.
Target TextureFormat of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.
Returns
Type | Description |
|---|---|
| Awaitable<AsyncGPUReadbackRequest> |
Remarks
RequestAsync(Texture, int, GraphicsFormat)
Retrieves data asynchronously from a GPU resource.
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex, GraphicsFormat dstFormat)
Parameters
Resource to read the data from.
Index of the mipmap to be fetched.
Target TextureFormat of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.
Returns
Type | Description |
|---|---|
| Awaitable<AsyncGPUReadbackRequest> |
Remarks
RequestAsync(Texture, int, int, int, int, int, int, int)
Retrieves data asynchronously from a GPU resource.
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth)
Parameters
Resource to read the data from.
Index of the mipmap to be fetched.
Starting X coordinate in pixels of the Texture data to be fetched.
Width in pixels of the Texture data to be fetched.
Starting Y coordinate in pixels of the Texture data to be fetched.
Height in pixels of the Texture data to be fetched.
Returns
Type | Description |
|---|---|
| Awaitable<AsyncGPUReadbackRequest> |
Remarks
RequestAsync(Texture, int, int, int, int, int, int, int, TextureFormat)
Retrieves data asynchronously from a GPU resource.
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, TextureFormat dstFormat)
Parameters
Resource to read the data from.
Index of the mipmap to be fetched.
Starting X coordinate in pixels of the Texture data to be fetched.
Width in pixels of the Texture data to be fetched.
Starting Y coordinate in pixels of the Texture data to be fetched.
Height in pixels of the Texture data to be fetched.
Target TextureFormat of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.
Returns
Type | Description |
|---|---|
| Awaitable<AsyncGPUReadbackRequest> |
Remarks
RequestAsync(Texture, int, int, int, int, int, int, int, GraphicsFormat)
Retrieves data asynchronously from a GPU resource.
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, GraphicsFormat dstFormat)
Parameters
Resource to read the data from.
Index of the mipmap to be fetched.
Starting X coordinate in pixels of the Texture data to be fetched.
Width in pixels of the Texture data to be fetched.
Starting Y coordinate in pixels of the Texture data to be fetched.
Height in pixels of the Texture data to be fetched.
Target TextureFormat of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.
Returns
Type | Description |
|---|---|
| Awaitable<AsyncGPUReadbackRequest> |