Skip to content

Conversation

@aardgoose
Copy link
Contributor

The WebGPU renderer doesn't have a readRenderTargetPixels or equivalent api yet. WebGPU readback is async by nature so another API is required, this is a plain equivalent returning a Promise that resolves to a TypedArrayBuffer allocated by WebGPU, rather than the user providing an array to receive the results.

Open issues:

  • Previous discussions of an appropriate async api for WebGL2 rendering, see WebGLRenderer: Async Readback API - WIP #24466 etc.
  • The requirement that the bytesPerRow for the GPUBuffer layout must be a multiple of 256.
  • The returned TypedArrayBuffer is not 'transferable', a restriction that does not apply to user supplied buffers.

@sunag

@sunag sunag added this to the r154 milestone Jun 26, 2023
@sunag sunag requested a review from Mugen87 June 26, 2023 01:32
@sunag
Copy link
Collaborator

sunag commented Jun 26, 2023

@aardgoose Great, I just don't merge it now because the @Mugen87 review is very important for this PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants