Question on ComputeBuffer

Hi,

I hope it’s the correct forum.

I would like to know why we have to specify a kernel index when calling ComputeShader.SetBuffer?
If the buffer is already created on the device, why do we have to reset it if we call two kernels in a row?

Thanks in advance.
Alex

Since nobody responded, my guess: their wrapper around this stuff is overly simplified currently. Under the hood they’re actually separate shaders for each kernel. Also it needs to fit into their existing ShaderLab framework (be bindable to their materials etc.) If this seems like a performance bottleneck to you, I’d bring it up as an improvement request.