# SetProjectionMatrix(Matrix4x4)

> Add a command to set the projection matrix.

## Definition

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

```csharp
public void SetProjectionMatrix(Matrix4x4 proj)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.6/script-reference/unityengine/matrix4x4)): Projection (camera to clip space) matrix.

### Remarks

The projection matrix is the matrix that transforms from view space into homogeneous clip space.

When you want to set both the view and projection matrices, it's more efficient to use [CommandBuffer.SetViewProjectionMatrices](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setviewprojectionmatrices.md) because it sets both in one CommandBuffer command.

Additional Resources: [CommandBuffer.SetViewMatrix](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setviewmatrix.md), [CommandBuffer.SetViewProjectionMatrices](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setviewprojectionmatrices.md), [Camera.projectionMatrix](/engine/6000.6/script-reference/unityengine/camera/projectionmatrix.md), [Matrix4x4.Perspective](/engine/6000.6/script-reference/unityengine/matrix4x4/perspective.md).
