# SetGlobalMatrix

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

## Definition

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

## SetGlobalMatrix(int, Matrix4x4)

Add a "set global shader matrix property" command.

```csharp
public void SetGlobalMatrix(int nameID, Matrix4x4 value)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)):&#x20;

### Remarks

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

## SetGlobalMatrix(string, Matrix4x4)

Add a "set global shader matrix property" command.

```csharp
public void SetGlobalMatrix(string name, Matrix4x4 value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[Matrix4x4]\(/engine/6000.7/script-reference/unityengine/matrix4x4)):&#x20;

### Remarks

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