# Sandbox.Rendering.CommandList.UavBarrier

## Overload 1

```csharp
void UavBarrier(Texture texture)
```

Issues a UAV barrier for the given texture, ensuring writes from prior shader invocations
are visible to subsequent ones without changing the resource layout.

### Parameters

- `texture` (`Texture`): The texture to barrier.

## Overload 2

```csharp
void UavBarrier(ColorTextureRef texture)
```

Issues a UAV barrier for the color texture of the given render target handle, ensuring writes
from prior shader invocations are visible to subsequent ones without changing the resource layout.
Use this for a UAV (RWTexture) that is written in one pass and read back as a UAV in a later pass,
where the layout doesn't change and a plain transition wouldn't emit a barrier.

### Parameters

- `texture` (`ColorTextureRef`): The render target color handle.

## Overload 3

```csharp
void UavBarrier(RenderTargetHandle handle)
```

Issues a UAV barrier for the color texture of the given render target handle.

### Parameters

- `handle` (`RenderTargetHandle`): The render target handle.

## Overload 4

```csharp
void UavBarrier(GpuBuffer buffer)
```

Issues a UAV barrier for the given GPU buffer, ensuring writes from prior shader invocations
are visible to subsequent ones.

### Parameters

- `buffer` (`GpuBuffer`): The buffer to barrier.

Declared in [Sandbox.Rendering.CommandList](/api/Sandbox.Rendering.CommandList).
Assembly: `Sandbox.Engine`.
