leod / posh

Type-Safe Graphics Programming with Functional Shaders
136 stars 2 forks source link

Is it possible to read back buffers/textures on the CPU? #166

Open wyvernbw opened 9 months ago

wyvernbw commented 9 months ago

Thank you for work on this library. It's great and has a lot of potential :)

I wish to know if there's a way to read back data sent to the gpu. Is it possible to have the shader draw something to a buffer, read it back on the cpu and for example save it to an image? I've looked at the framebuffer examples but i don't really get how you can get data out of them.

leod commented 9 months ago

Thanks for your interest in posh!

I think this is a missing feature as of now. We basically need the ability to go from a texture back to an image (i.e., glGetTexImage).

I'll look into implementing this in the next couple of weeks.

wyvernbw commented 9 months ago

Appreciate it! It would help with my use case of post processing images in batch on the gpu, thanks