# SetGlobalBuffer

> Add a "set global shader buffer property" command.

## Definition

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

## SetGlobalBuffer(string, ComputeBuffer)

Add a "set global shader buffer property" command.

```csharp
public void SetGlobalBuffer(string name, ComputeBuffer value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.**** (\[ComputeBuffer]\(/engine/6000.0/script-reference/unityengine/computebuffer)): The buffer to set.

### Remarks

When the command buffer will be executed, a global shader buffer property will be set at this point. The effect is as if [Shader.SetGlobalBuffer](/engine/6000.0/script-reference/unityengine/shader/setglobalbuffer.md) was called.

## SetGlobalBuffer(int, ComputeBuffer)

Add a "set global shader buffer property" command.

```csharp
public void SetGlobalBuffer(int nameID, ComputeBuffer value)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The name ID of the property retrieved by [Shader.PropertyToID](/engine/6000.0/script-reference/unityengine/shader/propertytoid.md).**** (\[ComputeBuffer]\(/engine/6000.0/script-reference/unityengine/computebuffer)): The buffer to set.

### Remarks

When the command buffer will be executed, a global shader buffer property will be set at this point. The effect is as if [Shader.SetGlobalBuffer](/engine/6000.0/script-reference/unityengine/shader/setglobalbuffer.md) was called.

## SetGlobalBuffer(string, GraphicsBuffer)

Add a "set global shader buffer property" command.

```csharp
public void SetGlobalBuffer(string name, GraphicsBuffer value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.**** (\[GraphicsBuffer]\(/engine/6000.0/script-reference/unityengine/graphicsbuffer)): The buffer to set.

### Remarks

When the command buffer will be executed, a global shader buffer property will be set at this point. The effect is as if [Shader.SetGlobalBuffer](/engine/6000.0/script-reference/unityengine/shader/setglobalbuffer.md) was called.

## SetGlobalBuffer(int, GraphicsBuffer)

Add a "set global shader buffer property" command.

```csharp
public void SetGlobalBuffer(int nameID, GraphicsBuffer value)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The name ID of the property retrieved by [Shader.PropertyToID](/engine/6000.0/script-reference/unityengine/shader/propertytoid.md).**** (\[GraphicsBuffer]\(/engine/6000.0/script-reference/unityengine/graphicsbuffer)): The buffer to set.

### Remarks

When the command buffer will be executed, a global shader buffer property will be set at this point. The effect is as if [Shader.SetGlobalBuffer](/engine/6000.0/script-reference/unityengine/shader/setglobalbuffer.md) was called.
