稀疏纹理
CullingGroup API

图形硬件功能和仿真

最终渲染场景的图形硬件由称为着色器的专用程序来控制。硬件的功能已在不停进步,伴随每个阶段产生的一般功能集称为 Shader Model。不断更新的 Shader Model 可以支持更长的程序、更强大的分支指令和其他功能,并且这些特性已经让游戏的图形性能得到改善。

Unity Editor 可以对多组 Shader Model 和图形 API 限制进行仿真,以便快速了解在特定 GPU 或图形 API 上运行时游戏的外观概况。请注意,虽然Editor 内的仿真非常近似,但是仍然建议在目标硬件上实际运行游戏程序。

要选择图形仿真级别,请选择 Edit > Graphics Emulation 菜单。请注意,可用选项会根据您在 Build Settings 中当前设置的目标平台而不同。您可以通过选择 No Emulation 来恢复硬件的完整功能。如果您的开发计算机不支持特定 Shader Model,则该菜单项将被禁用。

Shader Model 4(独立平台和通用 Windows 平台)

  • 对 DirectX 10 功能集仿真(2007 到 2009 年期间制造的 PC GPU)。
  • Turns off support for compute Shaders and related features (compute buffers, random-write Textures), sparse Textures, and tessellation Shaders.

Shader Model 3(独立平台)

  • 对 DirectX 9 SM3.0 功能集仿真(2004 到 2006 年期间制造的 PC GPU)。
  • In addition to features turned off by Shader Model 4 emulation, this also turns off support for draw call instancing, Texture Arrays, and geometry Shaders. It enforces a maximum of 4 simultaneous render targets, and a maximum of 16 Textures used in a single Shader.

Shader Model 2(独立平台)

  • 对 DirectX 9 SM2.0 功能集仿真(2002 到 2004 年期间制造的 PC GPU)。
  • In addition to features turned off by Shader Model 3 emulation, this also turns off support for HDR rendering, Linear color space and depth Textures.

OpenGL ES 3.0(Android 平台)

  • 对移动端 OpenGL ES 3.0 功能集仿真。
  • Turns off support for compute Shaders and related features (compute buffers, random-write Textures), sparse Textures, tessellation Shaders and geometry Shaders. Enforces maximum of 4 simultaneous render targets, and maximum of 16 Textures used in a single Shader. Maximum allowed Texture size is set to 4096, and maximum cubemap size to 2048. Realtime soft shadows are disabled.

Metal(iOS 和 tvOS 平台)

  • 对移动端 Metal 功能集仿真。
  • Same restrictions applied as GLES3.0 emulation, except that the maximum cubemap size is set to 4096.

OpenGL ES 2.0 (Android, iOS, tvOS, Tizen platforms)

  • 对移动端 OpenGL ES 2.0 功能集仿真。
  • In addition to features turned off by GLES3.0 emulation, this also turns off support for draw call instancing, Texture arrays, 3D Textures and multiple render targets. Enforces a maximum of 8 Textures used in a single Shader. Maximum allowed cubemap size is set to 1024.

WebGL 1 和 WebGL 2(WebGL 平台)

  • 对典型 WebGL 图形限制进行仿真。
  • Very similar to GLES2.0 and GLES3.0 emulation levels above, except that supported Texture sizes are higher (8192 for regular Textures, 4096 for cubemaps), and 16 Textures are allowed in a single Shader.

Shader Model 2 - DX11 FL9.3(通用 Windows 平台)

  • 对典型 Windows Phone 图形功能集仿真。
  • Very similar to Shader Model 2 emulation, but also disables multiple render targets and separate alpha blending.

• 2017–05–16 Page amended with no editorial review

稀疏纹理
CullingGroup API