# Sandbox.ComputeShader.Dispatch

```csharp
void Dispatch(int threadsX = 32, int threadsY = 32, int threadsZ = 32)
```

Dispatch this compute shader using explicit thread counts.

## Remarks

The specified thread counts will be automatically divided by the thread group size
defined in the shader to compute the final dispatch group count.

When called outside a graphics context, the dispatch runs immediately.  
When called inside a graphics context, the dispatch runs async.

### Parameters

- `threadsX` (`int`), default `32`: The number of threads to dispatch in the X dimension.
- `threadsY` (`int`), default `32`: The number of threads to dispatch in the Y dimension.
- `threadsZ` (`int`), default `32`: The number of threads to dispatch in the Z dimension.

Declared in [Sandbox.ComputeShader](/api/Sandbox.ComputeShader).
Assembly: `Sandbox.Engine`.
