Different texture format for webgpu?

Hi all!

Question for the team… We have a reflection probe feature where we use the cubemap renderer to output baked reflection captures. This works in webgl2 mode (we use hdr.js to output a .hdr file) but in webgpu we get nonsense data.
I can’t see anything obvious that would be different so I’m wondering if theres anything off the top of your head about downloading textures from webgpu that might be either different or doesn’t work?

I have confirmed that the capture is good (the inspace lighting works so it must be the export).

I’m using this api to download, is it the correct one?

const data = await texture.read(0, 0, texture.width, texture.height, {
immediate: true
});


It should work, we use it in few places. There was this recent fix released in https://github.com/playcanvas/engine/releases/tag/v2.7.0, I assume you use at least this version?

I’m reading/writing to PIXELFORMAT_RGBA32F but thanks I’ll debug that area of code and see if anything obvious is wrong

Do you actually download a 32bit texture anywhere? It seems to work fine with srgb8 but rgba32f is all messed up. In truth, though the intention was to output to hdr (because that makes sense for baking lighting!) its never actually done that so I can fix my short term issue by going to 8bit. That seems to produce a good enough capture as I’ll have to do additional work anyway to get cubemap renderer to actually output to hdr

I don’t think I’ve tried 32bit data, so there could be a bug somewhere.