Version: 5.4 beta (switch to 5.3)
Level of Detail
OpenGL Core Details

DirectX 11 and OpenGL Core

Unity has ability to use DirectX 11 and OpenGL Core graphics APIs, with all the goodies that you expect from them: compute shaders, tessellation shaders, shader model 5.0 and so on.

Enabling DirectX 11

This option is on by default (i.e. on Windows, your games and editor will try to use DX11, and fall back to DX9 when not available). To enable DirectX 11 for your game builds and the editor, set “Use DX11” option in Player Settings.

NOTE: DX11 requires Windows Vista or later and at least a DX10-level GPU (preferably DX11-level). Unity editor window title has “<DX11>” at the end when it is actually running in DX11 mode.

Enabling OpenGL Core

This option is on by default for Mac and Linux (i.e. on these platforms, your games and editor will use OpenGL Core.

You can enable OpenGL Core on windows and make it default, by going to the Player Settings, unchecking “Auto Graphics API for Windows”, and adding OpenGL Core to the list. You can then drag OpenGL Core to the top of the list if you would like it to be the default.

Enabling OpenGL Core for Windows
Enabling OpenGL Core for Windows

NOTE: OpenGL Core minimum requirements:*

  • Mac OS X 10.8 (OpenGL 3.2), MacOSX 10.9 (OpenGL 3.2 to 4.1)
  • Windows with NVIDIA since 2006 (GeForce 8), AMD since 2006 (Radeon HD 2000), Intel since 2012 (HD 4000 / IvyBridge) (OpenGL 3.2 to OpenGL 4.5).
  • Linux (OpenGL 3.2 to OpenGL 4.5).

Image Effects that can take advantage of DX11 / OpenGL Core

Compute Shaders

Compute shaders allow using GPU as a massively parallel processor. See Compute Shaders page for mode details.

Tessellation & Geometry Shaders

Surface shaders have support for simple tessellation & displacement, see Surface Shader Tessellation page.

When manually writing shader programs, you can use full set of DX11 shader model 5.0 features, including geometry, hull & domain shaders.

Surface shaders and DX11

Currently some parts of surface shader compilation pipeline do not understand DX11-specific HLSL syntax, so if you’re HLSL features like StructuredBuffers, RWTextures and other non-DX9 syntax, you have to wrap it into a DX11-only preprocessor macro. See Platform Specific Differences page for details.

Examples

The following screenshots show examples of what becomes possible with DirectX 11 / OpenGL Core.

The volumetric explosion in these 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 volumetric explosion in these 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 this shot is implemented via tessellation & geometry shaders to dynamically generate and animate individual strings of hair. Shading is based on a model proposed by Kajiya-Kai that enables a more believable diffuse and specular behaviour.
The hair in this shot is implemented via tessellation & geometry shaders to dynamically generate and animate individual strings 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 above, the shown slippers fur is also based on generating geometry emitted from a simple base slippers mesh.
Similar to the hair technique above, the shown slippers fur is also based on generating geometry emitted from a simple base slippers mesh.
The blur effect in this image (known as Bokeh) is based on splatting a texture on top of very bright pixels. This can create very believable camera lens blurs, especially when used in conjunction with HDR rendering.
The blur effect in this image (known as Bokeh) is based on splatting a texture on top of very bright pixels. This can create very believable camera lens blurs, especially when used in conjunction with HDR rendering.
Exaggerated lens blur similar to the screenshot above. This is a possible result using the new Depth of Field effect
Exaggerated lens blur similar to the screenshot above. This is a possible result using the new Depth of Field effect
Level of Detail
OpenGL Core Details