How to get a float out of the CPU?

Hello

I build a little skia patch that allows me to visualise the relationship between numbers and colours on the GPU. I am fairly happy with the development on the skia side of things, but I am somehow struggling to get a simple float calculation out of the GPU.

In simple terms, i would like to be able to do something like this:

Capture

Something that calculates one value and give me back that value… and i can choose if i would like to keep the output on the GPU or transfer it to the CPU. Is that possible?

thank you very much

1 Like

Use a ReadBackFloat node from Stride.Buffers.Readback.

There is an help patch called How to Use Resources in Fuse and another in Stride called Explanation Overview Buffers and Textures

Note that taking value back from GPU is something that can cost performance so try to avoid it when possible.

thanks! I think i got somehow! I agree, a bit oversized … but it does what it needs to do…