Version: 2023.2

ShaderCompilerPlatform

enumeration

切换到手册

描述

用于生成播放器数据着色器变体的着色器编译器。

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.

Additional resources: IPreprocessShaders.OnProcessShader, Shader language.

变量

None为非初始化变量提供合理的值。
D3D在 Windows 平台上与 Direct3D 11 和 Direct3D 12 图形 API 一起使用的编译器。
GLES3x在 Android、iOS、Windows 和 WebGL 平台上与 OpenGL ES 3.x 和 WebGL 2.0 图形 API 一起使用的编译器。
PS4在 PlayStation 4 上使用的编译器。
XboxOneD3D11在 XBox One 上与 Direct3D 11 图形 API 一起使用的编译器。
Metal在 macOS、iOS 和 tvOS 平台上与 Metal 图形 API 一起使用的编译器。
OpenGLCore在 macOS、Linux 和 Windows 平台上与 OpenGL Core 图形 API 一起使用的编译器。
Vulkan在 Android、Linux 和 Windows 平台上与 Vulkan 图形 API 一起使用的编译器。
Switch在 Nintendo Switch 上使用的编译器。
XboxOneD3D12在 XBox One 上与 Direct3D 12 图形 API 一起使用的编译器。
WebGPUCompiler used with WebGPU graphics API.

Did you find this page useful? Please give it a rating: