Method SetComputeBufferParam
SetComputeBufferParam(CommandBuffer, ComputeShaderInstance, int, ComputeBuffer)
Adds a command to set a compute buffer parameter on a compute shader.
Declaration
public static void SetComputeBufferParam(this CommandBuffer cmd, ComputeShaderInstance shader, int nameID, ComputeBuffer buffer)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | The command buffer. |
ComputeShaderInstance | shader | The compute shader to set the parameter for. |
int | nameID | The property name ID. |
ComputeBuffer | buffer | The compute buffer to set. |
SetComputeBufferParam<T>(CommandBuffer, ComputeShaderInstance, int, StructuredBuffer<T>)
Adds a command to set a compute buffer parameter on a compute shader.
Declaration
public static void SetComputeBufferParam<T>(this CommandBuffer cmd, ComputeShaderInstance shader, int nameID, StructuredBuffer<T> buffer) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | The command buffer. |
ComputeShaderInstance | shader | The compute shader to set the parameter for. |
int | nameID | The property name ID. |
StructuredBuffer<T> | buffer | The compute buffer to set. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in the GPU buffer. |
SetComputeBufferParam<T>(CommandBuffer, ComputeShaderInstance, int, ExchangeBuffer<T>)
Adds a command to set a compute buffer parameter on a compute shader.
Declaration
public static void SetComputeBufferParam<T>(this CommandBuffer cmd, ComputeShaderInstance shader, int nameID, ExchangeBuffer<T> buffer) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | The command buffer. |
ComputeShaderInstance | shader | The compute shader to set the parameter for. |
int | nameID | The property name ID. |
ExchangeBuffer<T> | buffer | The compute buffer to set. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in the GPU buffer. |