# Sandbox.ComputeShader

A compute shader is a program that runs on the GPU, often with data provided to/from the CPU by means of a [Sandbox.GpuBuffer<T>](/api/Sandbox.GpuBuffer<T>) or a [Sandbox.Texture](/api/Sandbox.Texture).

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`

## Constructors

- [`ComputeShader`](/api/Sandbox.ComputeShader/.ctor): Create a compute shader from the specified path.

## Properties

- [`Attributes`](/api/Sandbox.ComputeShader/Attributes): Attributes that are passed to the compute shader on dispatch.

## Methods

- [`Dispatch`](/api/Sandbox.ComputeShader/Dispatch): Dispatch this compute shader using explicit thread counts.
- [`DispatchIndirect`](/api/Sandbox.ComputeShader/DispatchIndirect): Dispatch this compute shader by reading thread group counts (x, y, z) from an indirect buffer of type [Sandbox.GpuBuffer.IndirectDispatchArguments](/api/Sandbox.GpuBuffer.IndirectDispatchArguments).
- [`DispatchIndirectWithAttributes`](/api/Sandbox.ComputeShader/DispatchIndirectWithAttributes)
- [`DispatchWithAttributes`](/api/Sandbox.ComputeShader/DispatchWithAttributes)
