Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ShaderCompilerPlatform

Shader compiler used to generate player data shader variants.
Read time 1 minuteLast updated 4 days ago

Definition

public enum ShaderCompilerPlatform

Remarks

In Unity, shader programs are written in a variant of HLSL language.
Each platform 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.

Fields

Value

Description

D3DCompiler used with Direct3D 11 and Direct3D 12 graphics API on Windows platforms.
GLES3xCompiler used with OpenGL ES 3.x and WebGL 2.0 graphics APIs on Android, iOS, Windows and WebGL platforms.
MetalCompiler used with Metal graphics API on macOS, iOS and tvOS platforms.
NoneProvide a reasonable value for non initialized variables.
OpenGLCoreCompiler used with OpenGL core graphics API on macOS, Linux and Windows platforms.
VulkanCompiler used with Vulkan graphics API on Android, Linux and Windows platforms.
WebGPUCompiler used with WebGPU graphics API.