Post

Note to self: writing texture to a buffer and reading from it in WebGPU is trickier than I expected. Mapping buffer in my particular case seems to be slow, only happens on every 7nth so it must be 100+ ms.

0 reposts3 likes

Dawn. Each frame I try to copyTextureToBuffer and map the buffer (and skip those two while waiting for callback). I am trying to do classic mouse picking – render pass produces texture where each pixel is ID of a mesh. Maybe I should use compute shader to read the value and print to 4 byte buffer.