# SetRenderPassData(int, NativeArray<AttachmentDescriptor>, NativeArray<SubPassDescriptor>, int, int, int)

> Sets the relevant graphics state fields according to the provided render pass data.

## Definition

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

```csharp
public void SetRenderPassData(int samples, NativeArray<AttachmentDescriptor> attachments, NativeArray<SubPassDescriptor> subPasses, int subPassIndex = 0, int depthAttachmentIndex = -1, int shadingRateIndex = -1)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[NativeArray\<AttachmentDescriptor>]\(/engine/6000.5/script-reference/unity/collections/nativearray1)): Array of color attachments used in this rendering configuration.**** (\[NativeArray\<SubPassDescriptor>]\(/engine/6000.5/script-reference/unity/collections/nativearray1)): Array containing information of each subpass.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the active subpass in this rendering configuration.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the attachment to be used as the depth/stencil buffer for this rendering configuration.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of attachment used as shading rate image.
