Version: 2017.2
LOD
OpenGL コア詳細

DirectX 11 and OpenGL Core

Unity supports DirectX 11 (DX11) and OpenGL Core graphics APIs. This page details how to use them.

Enabling DirectX 11

DirectX 11 is enabled by default on Windows. Your games and the Unity Editor use DX11, and fall back to DX9 when DX11 is not available.

To enable or disable DirectX 11 for your game builds and the Editor, go to Edit > Project Settings > Player to open the Player Settings. Navigate to Other Settings and un-tick Auto Graphics API for Windows. In the panel that appears, select Direct3D11 and click the minus (-) button to remove it, or click the plus (+) button and choose Direct3D11 from the list to add it.

Adding Direct3D11 to the Graphics APIs for Windows list
Adding Direct3D11 to the Graphics APIs for Windows list

Once Direct3D11 is in the list, you can drag it up and down to define the priority in which the graphics API is selected - the Unity Editor and player defaults to the one at the top of the list, and uses each one after that as a fall back option, in order of how they are listed.

注意 *DX11 を使用するには、少なくとも Windows Vista かそれ以降で、少なくとも DX10 レベル (できれば DX11 レベル) の GPU が必要です。DX11 モードで作動している場合は、Unity エディターウィンドウのタイトルの後ろに <DX11> と表示されます。

OpenGL コアの有効化

OpenGL Core is enabled by default on Mac and Linux. Your games and the Unity Editor use OpenGL Core on these platforms.

To enable OpenGL Core on Windows and make it the default, go to Edit > Project Settings > Player to open the Player Settings. Navigate to Other Settings and un-tick Auto Graphics API for Windows. In the panel that appears, click the plus (+) button and choose OpenGLCore from the list to add it.

Adding OpenGLCore to the Graphics APIs for Windows list
Adding OpenGLCore to the Graphics APIs for Windows list

OpenGL コアには以下の最低要件があります。

  • Mac OS X 10.8 (OpenGL 3.2)、MacOSX 10.9 (OpenGL 3.2 から 4.1)
  • 以下を登載の Windows - 2006 年以降の NVIDIA (GeForce 8)、2006 年以降の AMD (Radeon HD 2000)、2012 年以降の Intel (HD 4000/IvyBridge) (OpenGL 3.2 から OpenGL 4.5)
  • Linux (OpenGL 3.2 から OpenGL 4.5)

コンピュートシェーダー

Compute Shaders allow you to use GPU as a parallel processor. See documentation on Compute Shaders for more information.

テッセレーションシェーダー & ジオメトリシェーダー

サーフェスシェーダーは、単純なテッセレーションとディスプレイスメントをサポートしています。 詳細については、サーフェスシェーダーテッセレーション を参照してください。

シェーダープログラム を手動で作成する場合は、Geometry Shader、Hull Shader、Domain Shader などを含め、 DX11 シェーダーモデル 5.0 の全機能を使用できます。

Surface Shaders and DX11

Some parts of the Surface Shader compilation pipeline do not understand DX11-specific HLSL syntax, so if you’re using HLSL features like StructuredBuffers, RWTextures and other non-DX9 syntax, you need to wrap it into a DX11-only preprocessor macro. See documentation on Platform-specific differences for more information.

The following screenshots show examples of what you can achieve with DirectX 11 and OpenGL Core.

The volumetric explosion in the above shots is rendered using raymarching, which becomes plausible with Shader Model 5.0. Moreover, as it generates and updates depth values, it becomes fully compatible with depth-based Image Effects such as Depth of Field or Motion Blur.

The hair in the above shot is implemented via tessellation and geometry Shaders to dynamically generate and animate individual strands of hair. Shading is based on a model proposed by Kajiya-Kai that enables a more believable diffuse and specular behaviour.

Similar to the hair technique shown in the previous image, the fur on this pair of slippers is also based on generating geometry emitted from a simple base slippers Mesh.

The blur effect in the image above (known as Bokeh) is based on stamping a Texture on top of very bright pixels. This creates very believable camera lens blurs, especially when used in conjunction with HDR rendering.

This image shows an exaggerated lens blur. This is a possible result of using the Depth of Field effect.

LOD
OpenGL コア詳細
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961