Direct3D

from Wikipedia, the free encyclopedia
pipeline

Direct3D is a programming interface (API) from Microsoft for 3D computer graphics . Direct3D is part of DirectX . The company RenderMorphic , founded by Servan Keondjian in 1992 , was bought by Microsoft in 1995 in order to further develop its 3D API Reality Labs to Direct3D and to integrate it in DirectX 2.0 in 1996. Keondjian led the work and Doug Rabson served as chief developer of the Microsoft team that developed the 3D API for Windows 95. Upon completion, Keondjian and Rabson left the company.

Direct3D is used to give Windows applications the most direct possible access to the hardware of a computer. Direct3D is often used primarily for computer games , where it competes with the platform and operating system-independent OpenGL . Unlike OpenGL, Direct3D uses a left-handed coordinate system .

For a long time the independent programming interface DirectDraw for programming 2D computer graphics was integrated with DirectX 8.0 in Direct3D.

In addition to Direct3D, Windows also has the Graphics Device Interface (GDI) for graphics output . The GDI provides an abstract programming interface in which it makes little difference to the programmer whether drawing on a screen or on a printer. However, this abstraction makes the output itself much slower, among other things because the GDI has to reproduce complex drawing commands from basic operations. In contrast to Direct3D, the GDI is therefore primarily used to display normal desktop applications that are not too graphic-intensive. In the meantime, there are also other graphic interfaces in Windows, such as B. GDI + or Direct2D .

With Direct3D, on the other hand, applications can access the hardware directly bypassing GDI. If a device does not support a more complex command, Direct3D only returns an error message. It is then the task of the application to respond adequately to this error message - for example by emulating the command from basic operations, by displaying it less detailed or by sending an error message to the user.

Various graphics cards support Direct3D through device drivers that map the standardized Direct3D API commands to the graphics hardware. Direct3D differentiates between initializing and executing commands. Initializing commands convert more complex data structures - such as textures - into the graphics card-specific format, executing commands display the elements converted in this way. Since items can take some time to initialize and convert, it is common in games to do this while a new level is loading . Executing commands, on the other hand, are optimized for the highest possible speed.

Modern graphics cards provide so-called hardware shaders . These shaders are executable mini-programs that are used to create 3D effects. For the programming of the shaders, Microsoft defined its own machine language , which is predominantly supported directly in their chips by the two currently leading producers of graphics chips, NVIDIA and AMD . Nowadays, however, high-level languages such as HLSL or GLSL are mainly used for shader programming. Direct3D allows the available shader types ( vertex shaders , pixel shaders and geometry shaders ) to be controlled.

Supported Platforms

The first versions of Direct3D were developed for Windows 95 . The current Windows version of Direct3D is version 11.x, but like Direct3D 10, this is only supported in Windows Vista and Windows 7 , as well as Windows 8 in newer sub- versions . The still available version 9.0c supports both the successor to Windows 95 and - with Windows XP - the NT line.

The Xbox and Xbox 360 game consoles produced by Microsoft are also programmed with versions of Direct3D. In addition to these two platforms officially supported by Microsoft, there are two implementations of the Direct3D API for Linux, Cedega and Wine . The Sega Dreamcast was also compatible with Direct3D.

Feature levels

With Direct3D 10.1 the concept of feature levels was introduced.

9.1 9.2 9.3 10.0 10.1 11.0 11.1 12.0 12.1
Shader model 2.0 2.0 4.0 (4.0_level_9_3) 4.0 4.x 5.0 5.0 5.1 5.1
Geometry shader No No No Yes Yes Yes Yes Yes Yes
Stream Out No No No Yes Yes Yes Yes Yes Yes
DirectCompute / Compute-Shader No No No part part Yes Yes Yes Yes
Hull shader No No No No No Yes Yes Yes Yes
Domain shader No No No No No Yes Yes Yes Yes
Tiled Resources No No No No No part part Tier2 Tier2
Conservative rasterization No No No No No No part part Tier1
Rasterizer Order Views No No No No No No part part Yes
Min / Max Filters No No No No No No part part Yes
Map default buffer No No No No No part part part part
Texture Resource Array No No No Yes Yes Yes Yes Yes Yes
Cubemap Resource Arrays No No No No Yes Yes Yes Yes Yes
BC4 / BC5 compression No No No Yes Yes Yes Yes Yes Yes
BC6H / BC7 compression No No No No No Yes Yes Yes Yes
Alpha to coverage No No No Yes Yes Yes Yes Yes Yes
Extended formats Yes Yes Yes part part Yes Yes Yes Yes
10-bit per color channel No No No part part Yes Yes Yes Yes
Logical operations (output merger) No No No part part part Yes Yes Yes
Rasterization independent of the target No No No No No No Yes Yes Yes
Multiple Render Target (MRT) with ForcedSampleCount 1 No No No part part part Yes Yes Yes
Unordered Access View (UAV) slots - - - 1 1 8th 64 64 64
UAV in every stage No No No No No No Yes Yes Yes
Max. ForcedSampleCount for UAV-only rendering - - - - - 8th 16 16 16
Constant buffer offsets and partial updates Yes Yes Yes part part part Yes Yes Yes
16 bit per pixel formats part part part part part part Yes Yes Yes
Max. Texture size 2048 2048 4096 8192 8192 16384 16384 16384 16384
Max. Cubemap size 512 512 4096 8192 8192 16384 16384 16384 16384
Max. Volume spreading 256 256 256 2048 2048 2048 2048 2048 2048
Max. Texture repetitions 128 2048 8192 8192 8192 16384 16384 16384 16384
Max. Anisotropy 2 16 16 16 16 16 16 16 16
Max. Number of primitives
Max. Input slots 16 16 16 16 32 32 32 32 32
Simultaneous render targets 1 1 4th 8th 8th 8th 8th 8th 8th
Occlusion queries No Yes Yes Yes Yes Yes Yes Yes Yes
Separate alpha blend No Yes Yes Yes Yes Yes Yes Yes Yes
Mirror Once No Yes Yes Yes Yes Yes Yes Yes Yes
Overlapping vertex elements No Yes Yes Yes Yes Yes Yes Yes Yes
Independent write masks No No Yes Yes Yes Yes Yes Yes Yes
Instancing No No Yes Yes Yes Yes Yes Yes Yes
Textures that are not a multiple of 2 No No No Yes Yes Yes Yes Yes Yes
Constant buffer No No No Yes Yes Yes Yes Yes Yes
Max. Number of constant buffers per shader - - - 15th 15th 15th 15th 15th 15th
Max. Number of constants in the constant buffer - - - 4096 4096 4096 4096 4096 4096
Index buffer formats 16-bit 16-bit, 32-bit 16-bit, 32-bit 16-bit, 32-bit 16-bit, 32-bit 16-bit, 32-bit 16-bit, 32-bit 16-bit, 32-bit 16-bit, 32-bit

See also

literature

  • Uli Theuerjahr: Direct3D Real Time Rendering for computer games. DirectX programming in C ++. Roulio Press, Schönberg 2007, ISBN 978-3-00-022340-2 .

Individual evidence

  1. Direct3D feature levels . MSDN. Retrieved September 30, 2014.
  2. Feature Level. In: indiedev.de. Archived from the original on October 6, 2014 ; accessed on June 25, 2020 .