What is the difference between the DispatchIndirect the Dispatch?

I thought DispatchIndirect would cause shaders to run multiple times at once. But that wasn’t true. I really don’t know now. What is the difference between DispatchIndirect and Dispatch?

Are you talking about compute shaders? Dispatch Indirect lets you set the thread groups in each dimension via a compute buffer. So if you don’t know the number of threads you want to launch on the CPU (for example, a chain of compute shaders calculates them), you put them in a buffer and use indirect.

1 Like

Thank you~!