# vertexAttributes

> An array of vertex attributes that define the vertex format of RayTracingMultiGeometryInstanceConfig.vertexBuffer.

## Definition

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

```csharp
public VertexAttributeDescriptor[] vertexAttributes { readonly get; set; }
```

### Remarks

The Position attribute is mandatory for building an acceleration structure. You can access other vertex attributes in shader code using helper functions from **UnityRayTracingMeshUtils.cginc** header.

```csharp
// Defining a vertex format that contains the position, the normal and texture coordinates attributes.
VertexAttributeDescriptor[] vertexDescs = new VertexAttributeDescriptor[3];
vertexDescs[0] = new VertexAttributeDescriptor(VertexAttribute.Position, VertexAttributeFormat.Float32, 3, 0);
vertexDescs[1] = new VertexAttributeDescriptor(VertexAttribute.Normal, VertexAttributeFormat.Float32, 3, 0);
vertexDescs[2] = new VertexAttributeDescriptor(VertexAttribute.TexCoord0, VertexAttributeFormat.Float32, 2, 0);
```

Unity supports the following Position attribute data formats for building acceleration structures:

* [VertexAttributeFormat.Float32](/engine/6000.5/script-reference/unityengine/rendering/vertexattributeformat/float32.md)
* [VertexAttributeFormat.Float16](/engine/6000.5/script-reference/unityengine/rendering/vertexattributeformat/float16.md)
* [VertexAttributeFormat.SNorm16](/engine/6000.5/script-reference/unityengine/rendering/vertexattributeformat/snorm16.md)

The Position attribute must be part of vertex buffer stream 0.

Additional Resources: [VertexAttributeDescriptor](/engine/6000.5/script-reference/unityengine/rendering/vertexattributedescriptor.md).
