I'm starting to wonder when should I use which. For example: I want to spawn grass of blades. For that I will use GPU instancing and a compute Buffer to pass the positions of each grass blade. Should I calculate those positions on a Job and then pass it to the compute buffer or in a compute shader that is setting it to the buffer? Is there a rule of thumb to decide when to do what?
#When should I use Jobs and When Compute Shaders?
1 messages · Page 1 of 1 (latest)
Im guessing that, for this example, since the info is for the gpu, it should be done on compute shaders
Depends if you already have a bottleneck on the CPU or GPU, but other than that yes, you should choose depending on where your final data are going to be used, because moving data between the CPU and GPU can also cause slowdowns
If you calculate draw data - shader will probably be better, since you avoid sending more data to gpu and that is not cheap
But you won't have any game logic work with that data, so...
very hardware-dependent. on PC, gpu<=>cpu is expensive, but on steam deck, not so much. just gotta measure on target hardware
Mmm, I see, I need to do some more research