I am interested in learning how to create a very basic gpu particle system (update velocities and positions on gpu) but cannot use compute shaders (on a mac) as many examples I have found are doing. I know very well how to do all this on the cpu but am trying to learn gpu methods as well. For the moment I am able to send all my position and velocity information to the shader using a sampler2d uniform but don’t understand how to get the changed data back to the cpu… or perhaps this is not the correct logic at all?
The idea with GPU particles is ideally the CPU never has to know this data. Usually reading back the data from the GPU takes more time than just doing the computation on the CPU to begin with (especially since Unity can only do synchronous reads from the GPU, so the entire CPU might stall for several milliseconds while you wait).