Skip to content

WebGPURenderer: Use ReadbackBuffer in readRenderTargetPixelsAsync(). #33555

@Mugen87

Description

@Mugen87

Description

see #29341 (comment)

WebGPURenderer.readRenderTargetPixelsAsync() creates a new buffer for each call. The idea is to find a solution to define a buffer once and reuse it.

Solution

Use the same approach of getArrayBufferAsync() in readRenderTargetPixelsAsync(). The PRs #33300 and #33322 introduced ReadbackBuffer.

Alternatives

  • Leave the code as it is.

Additional context

#29341

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions