# ShaderCompilerPlatform

> Shader compiler used to generate player data shader variants.

## Definition

* **Type:** Enum
* **Namespace:** [UnityEditor.Rendering](/engine/6000.0/script-reference/unityeditor/rendering.md)
* **Assembly:** UnityEditor

```csharp
public enum ShaderCompilerPlatform
```

## Remarks

In Unity, shader programs are written in a variant of [HLSL](/engine/6000.0/manual/materials-and-shaders/shaders/writing-custom/shader-writing/sl-shading-language.md) language.

Each [platform](/engine/6000.0/manual/platform-specific.md) supports one or multiple graphics APIs. For example, Vulkan and Direct3D 12 are both supported in Windows. When building a standalone player, for each supported graphics API, Unity runs a corresponding shader compiler which generates the shader variants and cross-compiles the shader snippet into the shading language natively supported by the graphics API.

Additional Resources: [IPreprocessShaders.OnProcessShader](/engine/6000.0/script-reference/unityeditor/build/ipreprocessshaders/onprocessshader.md), [Shader language](/engine/6000.0/manual/materials-and-shaders/shaders/writing-custom/shader-writing/sl-shading-language.md).

## Fields

| Value                                                                                                    | Description                                                                                                |
| -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| [D3D](/engine/6000.0/script-reference/unityeditor/rendering/shadercompilerplatform/d3d.md)               | Compiler used with Direct3D 11 and Direct3D 12 graphics API on Windows platforms.                          |
| [GLES3x](/engine/6000.0/script-reference/unityeditor/rendering/shadercompilerplatform/gles3x.md)         | Compiler used with OpenGL ES 3.x and WebGL 2.0 graphics APIs on Android, iOS, Windows and WebGL platforms. |
| [Metal](/engine/6000.0/script-reference/unityeditor/rendering/shadercompilerplatform/metal.md)           | Compiler used with Metal graphics API on macOS, iOS and tvOS platforms.                                    |
| [None](/engine/6000.0/script-reference/unityeditor/rendering/shadercompilerplatform/none.md)             | Provide a reasonable value for non initialized variables.                                                  |
| [OpenGLCore](/engine/6000.0/script-reference/unityeditor/rendering/shadercompilerplatform/openglcore.md) | Compiler used with OpenGL core graphics API on macOS, Linux and Windows platforms.                         |
| [Vulkan](/engine/6000.0/script-reference/unityeditor/rendering/shadercompilerplatform/vulkan.md)         | Compiler used with Vulkan graphics API on Android, Linux and Windows platforms.                            |
| [WebGPU](/engine/6000.0/script-reference/unityeditor/rendering/shadercompilerplatform/webgpu.md)         | Compiler used with WebGPU graphics API.                                                                    |
