Version: 2020.1

CommandBuffer.RequestAsyncReadback

切换到手册
public void RequestAsyncReadback (ComputeBuffer src, Action<AsyncGPUReadbackRequest> callback);
public void RequestAsyncReadback (ComputeBuffer src, int size, int offset, Action<AsyncGPUReadbackRequest> callback);
public void RequestAsyncReadback (GraphicsBuffer src, Action<AsyncGPUReadbackRequest> callback);
public void RequestAsyncReadback (GraphicsBuffer src, int size, int offset, Action<AsyncGPUReadbackRequest> callback);
public void RequestAsyncReadback (Texture src, Action<AsyncGPUReadbackRequest> callback);
public void RequestAsyncReadback (Texture src, int mipIndex, Action<AsyncGPUReadbackRequest> callback);
public void RequestAsyncReadback (Texture src, int mipIndex, TextureFormat dstFormat, Action<AsyncGPUReadbackRequest> callback);
public void RequestAsyncReadback (Texture src, int mipIndex, Experimental.Rendering.GraphicsFormat dstFormat, Action<AsyncGPUReadbackRequest> callback);
public void RequestAsyncReadback (Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, Action<AsyncGPUReadbackRequest> callback);
public void RequestAsyncReadback (Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, TextureFormat dstFormat, Action<AsyncGPUReadbackRequest> callback);
public void RequestAsyncReadback (Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, Experimental.Rendering.GraphicsFormat dstFormat, Action<AsyncGPUReadbackRequest> callback);

参数

src 要从中读取数据的资源。
size Size in bytes of the data to be retrieved from the ComputeBuffer or GraphicsBuffer.
offset Offset in bytes in the ComputeBuffer or GraphicsBuffer.
mipIndex 要获取的 Mipmap 的索引。
dstFormat 数据的目标 TextureFormat。如果该格式不同于 GPU 中存储的格式,则系统会自动执行转换。
x 要获取的纹理数据的起始 X 坐标(以像素为单位)。
y 要获取的纹理数据的起始 Y 坐标(以像素为单位)。
z 正在获取的 Texture3D 的起始 Z 坐标(以像素为单位)。正在获取的 TextureCube、Texture2DArray 和 TextureCubeArray 的起始层索引。
depth 正在获取的 Texture3D 的深度(以像素为单位)。TextureCube、TextureArray 和 TextureCubeArray 的层数。
width 要获取的纹理数据的宽度(以像素为单位)。
height 要获取的纹理数据的高度(以像素为单位)。
callback 完成请求后调用的委托 System.Action。完成请求作为参数传递给 System.Action。

描述

向命令缓冲区添加异步 GPU 回读请求命令。

另请参阅:AsyncGPUReadback.Request