# DrawProceduralIndirect

> Add a "draw procedural geometry" command.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.7/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

## DrawProceduralIndirect(Matrix4x4, Material, int, MeshTopology, ComputeBuffer, int, MaterialPropertyBlock)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, ComputeBuffer bufferWithArgs, int argsOffset, MaterialPropertyBlock properties)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.**** (\[MaterialPropertyBlock]\(/engine/6000.7/script-reference/unityengine/materialpropertyblock)): Additional material properties to apply just before rendering. See [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md).

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have four integer numbers at given `argsOffset` offset: vertex count per instance, instance count, start vertex location, and start instance location. This maps to Direct3D11 DrawInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(Matrix4x4, Material, int, MeshTopology, ComputeBuffer, int)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, ComputeBuffer bufferWithArgs, int argsOffset)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have four integer numbers at given `argsOffset` offset: vertex count per instance, instance count, start vertex location, and start instance location. This maps to Direct3D11 DrawInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(Matrix4x4, Material, int, MeshTopology, ComputeBuffer)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, ComputeBuffer bufferWithArgs)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): Buffer with draw arguments.

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have four integer numbers at given `argsOffset` offset: vertex count per instance, instance count, start vertex location, and start instance location. This maps to Direct3D11 DrawInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(GraphicsBuffer, Matrix4x4, Material, int, MeshTopology, ComputeBuffer, int, MaterialPropertyBlock)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(GraphicsBuffer indexBuffer, Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, ComputeBuffer bufferWithArgs, int argsOffset, MaterialPropertyBlock properties)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Index buffer used to submit vertices to the GPU.**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.**** (\[MaterialPropertyBlock]\(/engine/6000.7/script-reference/unityengine/materialpropertyblock)): Additional material properties to apply just before rendering. See [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md).

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without a vertex buffer. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have five integer numbers at given `argsOffset` offset: index count per instance, instance count, start index location, base vertex location, and start instance location. This maps to Direct3D11 DrawIndexedInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(GraphicsBuffer, Matrix4x4, Material, int, MeshTopology, ComputeBuffer, int)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(GraphicsBuffer indexBuffer, Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, ComputeBuffer bufferWithArgs, int argsOffset)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Index buffer used to submit vertices to the GPU.**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without a vertex buffer. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have five integer numbers at given `argsOffset` offset: index count per instance, instance count, start index location, base vertex location, and start instance location. This maps to Direct3D11 DrawIndexedInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(GraphicsBuffer, Matrix4x4, Material, int, MeshTopology, ComputeBuffer)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(GraphicsBuffer indexBuffer, Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, ComputeBuffer bufferWithArgs)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Index buffer used to submit vertices to the GPU.**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): Buffer with draw arguments.

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without a vertex buffer. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have five integer numbers at given `argsOffset` offset: index count per instance, instance count, start index location, base vertex location, and start instance location. This maps to Direct3D11 DrawIndexedInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(Matrix4x4, Material, int, MeshTopology, GraphicsBuffer, int, MaterialPropertyBlock)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, GraphicsBuffer bufferWithArgs, int argsOffset, MaterialPropertyBlock properties)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.**** (\[MaterialPropertyBlock]\(/engine/6000.7/script-reference/unityengine/materialpropertyblock)): Additional material properties to apply just before rendering. See [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md).

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have four integer numbers at given `argsOffset` offset: vertex count per instance, instance count, start vertex location, and start instance location. This maps to Direct3D11 DrawInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(Matrix4x4, Material, int, MeshTopology, GraphicsBuffer, int)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, GraphicsBuffer bufferWithArgs, int argsOffset)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have four integer numbers at given `argsOffset` offset: vertex count per instance, instance count, start vertex location, and start instance location. This maps to Direct3D11 DrawInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(Matrix4x4, Material, int, MeshTopology, GraphicsBuffer)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, GraphicsBuffer bufferWithArgs)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Buffer with draw arguments.

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have four integer numbers at given `argsOffset` offset: vertex count per instance, instance count, start vertex location, and start instance location. This maps to Direct3D11 DrawInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(GraphicsBuffer, Matrix4x4, Material, int, MeshTopology, GraphicsBuffer, int, MaterialPropertyBlock)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(GraphicsBuffer indexBuffer, Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, GraphicsBuffer bufferWithArgs, int argsOffset, MaterialPropertyBlock properties)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Index buffer used to submit vertices to the GPU.**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.**** (\[MaterialPropertyBlock]\(/engine/6000.7/script-reference/unityengine/materialpropertyblock)): Additional material properties to apply just before rendering. See [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md).

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without a vertex buffer. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have five integer numbers at given `argsOffset` offset: index count per instance, instance count, start index location, base vertex location, and start instance location. This maps to Direct3D11 DrawIndexedInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(GraphicsBuffer, Matrix4x4, Material, int, MeshTopology, GraphicsBuffer, int)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(GraphicsBuffer indexBuffer, Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, GraphicsBuffer bufferWithArgs, int argsOffset)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Index buffer used to submit vertices to the GPU.**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without a vertex buffer. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have five integer numbers at given `argsOffset` offset: index count per instance, instance count, start index location, base vertex location, and start instance location. This maps to Direct3D11 DrawIndexedInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(GraphicsBuffer, Matrix4x4, Material, int, MeshTopology, GraphicsBuffer)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(GraphicsBuffer indexBuffer, Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, GraphicsBuffer bufferWithArgs)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Index buffer used to submit vertices to the GPU.**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Buffer with draw arguments.

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without a vertex buffer. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have five integer numbers at given `argsOffset` offset: index count per instance, instance count, start index location, base vertex location, and start instance location. This maps to Direct3D11 DrawIndexedInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(Matrix4x4, Material, int, MeshTopology, ComputeBuffer, int, uint, ComputeBuffer, int, MaterialPropertyBlock)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, ComputeBuffer bufferWithArgs, int argsOffset, uint drawCount, ComputeBuffer countBuffer = null, int countBufferOffset = 0, MaterialPropertyBlock properties = null)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): **** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[MaterialPropertyBlock]\(/engine/6000.7/script-reference/unityengine/materialpropertyblock)): Additional material properties to apply just before rendering. See [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md).

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have four integer numbers at given `argsOffset` offset: vertex count per instance, instance count, start vertex location, and start instance location. This maps to Direct3D11 DrawInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(GraphicsBuffer, Matrix4x4, Material, int, MeshTopology, ComputeBuffer, int, uint, ComputeBuffer, int, MaterialPropertyBlock)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(GraphicsBuffer indexBuffer, Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, ComputeBuffer bufferWithArgs, int argsOffset, uint drawCount, ComputeBuffer countBuffer = null, int countBufferOffset = 0, MaterialPropertyBlock properties = null)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): **** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): **** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[MaterialPropertyBlock]\(/engine/6000.7/script-reference/unityengine/materialpropertyblock)): Additional material properties to apply just before rendering. See [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md).

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have four integer numbers at given `argsOffset` offset: vertex count per instance, instance count, start vertex location, and start instance location. This maps to Direct3D11 DrawInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(Matrix4x4, Material, int, MeshTopology, GraphicsBuffer, int, uint, GraphicsBuffer, int, MaterialPropertyBlock)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, GraphicsBuffer bufferWithArgs, int argsOffset, uint drawCount, GraphicsBuffer countBuffer = null, int countBufferOffset = 0, MaterialPropertyBlock properties = null)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): **** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[MaterialPropertyBlock]\(/engine/6000.7/script-reference/unityengine/materialpropertyblock)): Additional material properties to apply just before rendering. See [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md).

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have four integer numbers at given `argsOffset` offset: vertex count per instance, instance count, start vertex location, and start instance location. This maps to Direct3D11 DrawInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).

## DrawProceduralIndirect(GraphicsBuffer, Matrix4x4, Material, int, MeshTopology, GraphicsBuffer, int, uint, GraphicsBuffer, int, MaterialPropertyBlock)

Add a "draw procedural geometry" command.

```csharp
public void DrawProceduralIndirect(GraphicsBuffer indexBuffer, Matrix4x4 matrix, Material material, int shaderPass, MeshTopology topology, GraphicsBuffer bufferWithArgs, int argsOffset, uint drawCount, GraphicsBuffer countBuffer = null, int countBufferOffset = 0, MaterialPropertyBlock properties = null)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): **** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)): Transformation matrix to use.**** (\[Material]\(/engine/6000.7/script-reference/unityengine/material)): Material to use.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which pass of the shader to use (or -1 for all passes).**** (\[MeshTopology]\(/engine/6000.7/script-reference/unityengine/meshtopology)): Topology of the procedural geometry.**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Buffer with draw arguments.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Byte offset where in the buffer the draw arguments are.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): **** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[MaterialPropertyBlock]\(/engine/6000.7/script-reference/unityengine/materialpropertyblock)): Additional material properties to apply just before rendering. See [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md).

### Remarks

When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. The amount of geometry to draw is read from a [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md). Typical use case is generating an arbitrary amount of data from a [ComputeShader](/engine/6000.7/script-reference/unityengine/computeshader.md) and then rendering that, without requiring a readback to the CPU.

This is only useful on [Shader Model 4.5](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/writing-shader-tags/sl-shader-compile-targets.md) level hardware where shaders can read arbitrary data from [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) buffers.

Buffer with arguments, `bufferWithArgs`, has to have four integer numbers at given `argsOffset` offset: vertex count per instance, instance count, start vertex location, and start instance location. This maps to Direct3D11 DrawInstancedIndirect and equivalent functions on other graphics APIs. On OpenGL versions before 4.2 and all OpenGL ES versions that support indirect draw, the last argument is reserved and therefore must be zero.

In the vertex shader, you'd typically use SV\_VertexID and SV\_InstanceID input variables to fetch data from some buffers.

Additional Resources: [CommandBuffer.DrawProcedural](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/drawprocedural.md), [MaterialPropertyBlock](/engine/6000.7/script-reference/unityengine/materialpropertyblock.md), [Graphics.DrawProceduralIndirect](/engine/6000.7/script-reference/unityengine/graphics/drawproceduralindirect.md), [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md), [SystemInfo.supportsComputeShaders](/engine/6000.7/script-reference/unityengine/systeminfo/supportscomputeshaders.md).
