# ShaderVariantCollection.ShaderVariant

> Identifies a specific variant of a shader.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public struct ShaderVariantCollection.ShaderVariant
```

## Remarks

In Unity, many shaders internally have multiple "variants", to account for different light modes, lightmaps, shadows and so on. These variants are indentified by a shader pass type, and a set of shader keywords. See [ShaderVariantCollection](/engine/6000.7/script-reference/unityengine/shadervariantcollection.md).

Note that creating a ShaderVariant will throw an ArgumentException if shader is null, pass type does not exist or variant with the passed keywords is not found.

## Fields

| Value                                                                                                     | Description                                      |
| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| [keywords](/engine/6000.7/script-reference/unityengine/shadervariantcollection/shadervariant/keywords.md) | Array of shader keywords to use in this variant. |
| [passType](/engine/6000.7/script-reference/unityengine/shadervariantcollection/shadervariant/passtype.md) | Pass type to use in this variant.                |
| [shader](/engine/6000.7/script-reference/unityengine/shadervariantcollection/shadervariant/shader.md)     | Shader to use in this variant.                   |

## Constructors

| Constructor                                                                                                                                                                     | Description                        |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| [ShaderVariant(UnityEngine.Shader,UnityEngine.Rendering.PassType,System.String\[\])](/engine/6000.7/script-reference/unityengine/shadervariantcollection/shadervariant/ctor.md) | Creates a ShaderVariant structure. |
