# ShaderVariant

> Create a ShaderVariant with the provided shader pass and keywords.

## Definition

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

## ShaderVariant(Shader, PassIdentifier, LocalKeyword\[])

Create a ShaderVariant with the provided shader pass and keywords.

```csharp
public ShaderVariant(Shader shader, PassIdentifier passId, LocalKeyword[] keywords)
```

### Parameters

**** (\[Shader]\(/engine/6000.6/script-reference/unityengine/shader)): Shader used in the variant.**** (\[PassIdentifier]\(/engine/6000.6/script-reference/unityengine/rendering/passidentifier)): PassIdentifier used in the variant.**** (\[LocalKeyword\[]]\(/engine/6000.6/script-reference/unityengine/rendering/localkeyword)): Array of keywords used in the variant.

## ShaderVariant(Material, PassIdentifier)

Create a ShaderVariant with the provided shader pass and keywords.

```csharp
public ShaderVariant(Material material, PassIdentifier passId)
```

### Parameters

**** (\[Material]\(/engine/6000.6/script-reference/unityengine/material)): Material with the shader and enabled keywords used in the variant.**** (\[PassIdentifier]\(/engine/6000.6/script-reference/unityengine/rendering/passidentifier)): PassIdentifier used in the variant.
