# SetCameraBuffer(Camera, VFXCameraBufferTypes, Texture, int, int, int, int)

> Use this method to set the buffer of a given type for this Camera. This allows the VFX Manager to use the buffer.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.VFX](/engine/6000.5/script-reference/unityengine/vfx.md)
* **Assembly:** UnityEngine.VFXModule

```csharp
public static void SetCameraBuffer(Camera cam, VFXCameraBufferTypes type, Texture buffer, int x, int y, int width, int height)
```

### Parameters

**** (\[Camera]\(/engine/6000.5/script-reference/unityengine/camera)): The Camera to set the buffer for.**** (\[VFXCameraBufferTypes]\(/engine/6000.5/script-reference/unityengine/vfx/vfxcamerabuffertypes)): The type of buffer to set.**** (\[Texture]\(/engine/6000.5/script-reference/unityengine/texture)): The buffer to set.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): X offset of the viewport in the buffer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Y offset of the viewport in the buffer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Width of the viewport in the buffer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Height of the viewport in the buffer.

### Remarks

In custom Scriptable Render Pipelines, this buffer allows the VFXManager to use buffer behaviors for the Camera, for example depth collisions. The buffer must be available during the VFX update of the next frame. To query the need for a buffer, call IsCameraBufferNeeded.
