Pass:read

Creates a Readback object which asynchronously downloads data from a Buffer, Texture, or Tally. The readback can be polled for completion, or, after this transfer pass is completed, Readback:wait can be used to block until the download is complete.


readback = Pass:read(buffer, index, count)

Arguments

NameTypeDescription
bufferBuffer The Buffer to download data from.
indexnumber The index of the first item to download.
countnumber The number of items to download.

Returns

NameTypeDescription
readbackReadback The new readback.

readback = Pass:read(texture, x, y, layer, level, width, height)

Arguments

NameTypeDefaultDescription
textureTexture The Texture to download data from.
xnumber0 The x offset of the region to download.
ynumber0 The y offset of the region to download.
layernumber1 The index of the layer to download.
levelnumber1 The index of the mipmap level to download.
widthnumbernil The width of the region to download. If nil, the region will be as wide as possible.
heightnumbernil The height of the region to download. If nil, the region will be as tall as possible.

Returns

NameTypeDescription
readbackReadback The new readback.

readback = Pass:read(tally, index, count)

Arguments

NameTypeDescription
tallyTally The Tally to download data from.
indexnumber The index of the first item to download.
countnumber The number of items to download.

Returns

NameTypeDescription
readbackReadback The new readback.

See also