Hubbry Logo
Direct3DDirect3DMain
Open search
Direct3D
Community hub
Direct3D
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Direct3D
Direct3D
from Wikipedia

Direct3D
DeveloperMicrosoft
Initial releaseJune 2, 1996; 29 years ago (1996-06-02)
Stable release
12.0 Beta 3 / January 13, 2015; 10 years ago (2015-01-13)
Operating systemMicrosoft Windows, Windows CE, Windows Embedded, Xbox system software
Platformx86, ARM
Type3D computer graphics API
LicenseProprietary
Websitelearn.microsoft.com/en-us/windows/win32/direct3d

Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware acceleration if available on the graphics card, allowing for hardware acceleration of the entire 3D rendering pipeline or even only partial acceleration. Direct3D exposes the advanced graphics capabilities of 3D graphics hardware, including Z-buffering,[1] W-buffering,[2] stencil buffering, spatial anti-aliasing, alpha blending, color blending, mipmapping, texture blending,[3][4] clipping, culling, atmospheric effects, perspective-correct texture mapping, programmable HLSL shaders[5] and effects.[6] Integration with other DirectX technologies enables Direct3D to deliver such features as video mapping, hardware 3D rendering in 2D overlay planes, and even sprites, providing the use of 2D and 3D graphics in interactive media ties.

Direct3D contains many commands for 3D computer graphics rendering; however, since version 8, Direct3D has superseded the DirectDraw framework and also taken responsibility for the rendering of 2D graphics.[7] Microsoft strives to continually update Direct3D to support the latest technology available on 3D graphics cards. Direct3D offers full vertex software emulation but no pixel software emulation for features not available in hardware. For example, if software programmed using Direct3D requires pixel shaders and the video card on the user's computer does not support that feature, Direct3D will not emulate it, although it will compute and render the polygons and textures of the 3D models, albeit at a usually degraded quality and performance compared to the hardware equivalent. The API does include a Reference Rasterizer (or REF device), which emulates a generic graphics card in software, although it is too slow for most real-time 3D applications and is typically only used for debugging. A new real-time software rasterizer, WARP, designed to emulate the complete feature set of Direct3D 10.1, is included with Windows 7 and Windows Vista Service Pack 2 with the Platform Update; its performance is said to be on par with lower-end 3D cards on multi-core CPUs.[8]

As part of DirectX, Direct3D is available for Windows 95 and above, and is the base for the vector graphics API on the different versions of Xbox console systems. The Wine compatibility layer, a free software reimplementation of several Windows APIs, includes an implementation of Direct3D.

Direct3D's main competitor is Khronos' OpenGL and its follow-on Vulkan. Fahrenheit was an attempt by Microsoft and SGI to unify OpenGL and Direct3D in the 1990s, but was eventually cancelled.

Overview

[edit]
  • Direct3D 6.0 – Multitexturing
  • Direct3D 7.0 – Hardware Transformation, Clipping and Lighting (TCL/T&L), DXVA 1.0
  • Direct3D 8.0 – Pixel Shader 1.0/1.1 & Vertex Shader 1.0/1.1[9]
  • Direct3D 8.1 – Pixel Shader 1.2/1.3/1.4[10][11][12]
  • Direct3D 9.0 – Shader Model 2.0 (Pixel Shader 2.0 & Vertex Shader 2.0)
  • Direct3D 9.0a – Shader Model 2.0a (Pixel Shader 2.0a & Vertex Shader 2.0a)
  • Direct3D 9.0b – Pixel Shader 2.0b, H.264
  • Direct3D 9.0c – last version supported for Windows 98/ME (early releases)[13] and for Windows 2000/XP (all releases);[14] Shader Model 3.0 (Pixel Shader 3.0 & Vertex Shader 3.0)
  • Direct3D 9.0L – Windows Vista only; Direct3D 9.0c, Shader Model 3.0, Windows Graphics Foundation 1.0, GPGPU
  • Direct3D 10.0 – Windows Vista/Windows 7; Shader Model 4.0, Windows Graphics Foundation 2.0, DXVA 2.0
  • Direct3D 10.1 – Windows Vista SP1/Windows 7; Shader Model 4.1, Windows Graphics Foundation 2.1, DXVA 2.1
  • Direct3D 11.0 – Windows Vista SP2/Windows 7; Shader Model 5.0, Tessellation, Multithreaded rendering, Compute shaders, implemented by hardware and software running Direct3D 9/10/10.1
  • Direct3D 11.1 – Windows 8 (partially supported on Windows 7 SP1 also); Stereoscopic 3D Rendering, H.265
  • Direct3D 11.2 – Windows 8.1; Tiled resources
  • Direct3D 11.3 – Windows 10
  • Direct3D 12.0 – Windows 10; low-level rendering API, Shader Model 5.1 and 6.0
  • Direct3D 12.1 – Windows 10; DirectX Raytracing
  • Direct3D 12.2 – Windows 10; DirectX 12 Ultimate

Direct3D 2.0 and 3.0

[edit]

In 1992, Servan Keondjian, Doug Rabson and Kate Seekings started a company named RenderMorphics, which developed a 3D graphics API named Reality Lab, which was used in medical imaging and CAD software.[15] Two versions of this API were released.[16] Microsoft bought RenderMorphics in February 1995, bringing its staff on board to implement a 3D graphics engine for Windows 95.[17] The first version of Direct3D shipped in DirectX 2.0 (June 2, 1996) and DirectX 3.0 (September 26, 1996).

Direct3D initially implemented an "immediate mode" 3D API and layered upon it a "retained mode" 3D API.[18] Both types of API were already offered with the second release of Reality Lab before Direct3D was released.[16] Like other DirectX APIs, such as DirectDraw, both were based on COM. The retained mode API was a scene graph API that attained little adoption. Game developers clamored for more direct control of the hardware's activities than the Direct3D retained mode could provide. Only two games that sold a significant volume, Lego Island and Lego Rock Raiders, were based on the Direct3D retained mode, so Microsoft did not update the retained mode API after DirectX 3.0.

For DirectX 2.0 and 3.0, the Direct3D immediate mode used an "execute buffer" programming model that Microsoft hoped hardware vendors would support directly. Execute buffers were intended to be allocated in hardware memory and parsed by the hardware to perform the 3D rendering. They were considered extremely awkward to program at the time, however, hindering adoption of the new API and prompting calls for Microsoft to adopt OpenGL as the official 3D rendering API for games as well as workstation applications.[19]

Rather than adopt OpenGL as a gaming API, Microsoft chose to continue improving Direct3D, not only to be competitive with OpenGL, but to compete more effectively with other proprietary APIs such as 3dfx's Glide.

From the beginning, the immediate mode also supported Talisman's tiled rendering with the BeginScene/EndScene methods of the IDirect3DDevice interface.

Direct3D 4.0

[edit]

No substantive changes were planned to Direct3D for DirectX 4.0, which was scheduled to ship in late 1996 and then cancelled.[20]

Direct3D 5.0

[edit]

In December 1996, a team in Redmond took over development of the Direct3D Immediate Mode, while the London-based RenderMorphics team continued work on the Retained Mode. The Redmond team added the DrawPrimitive API that eliminated the need for applications to construct execute buffers, making Direct3D more closely resemble other immediate mode rendering APIs such as Glide and OpenGL. The first beta of DrawPrimitive shipped in February 1997,[21] and the final version shipped with DirectX 5.0 in August 1997.[22]

Besides introducing an easier-to-use immediate mode API, DirectX 5.0 added the SetRenderTarget method that enabled Direct3D devices to write their graphical output to a variety of DirectDraw surfaces.[23]

Direct3D 6.0

[edit]

DirectX 6.0 (released in August, 1998) introduced numerous features to cover contemporary hardware (such as multitexture[24] and stencil buffers) as well as optimized geometry pipelines for x87, SSE and 3DNow! and optional texture management to simplify programming.[25] Direct3D 6.0 also included support for features that had been licensed by Microsoft from specific hardware vendors for inclusion in the API, in exchange for the time-to-market advantage to the licensing vendor. S3 texture compression support was one such feature, renamed as DXTC for purposes of inclusion in the API. Another was TriTech's proprietary bump mapping technique. Microsoft included these features in DirectX, then added them to the requirements needed for drivers to get a Windows logo to encourage broad adoption of the features in other vendors' hardware.

A minor update to DirectX 6.0 came in the February, 1999 DirectX 6.1 update. Besides adding DirectMusic support for the first time, this release improved support for Intel Pentium III 3D extensions.[26]

A confidential memo sent in 1997[27] shows Microsoft planning to announce full support for Talisman in DirectX 6.0, but the API ended up being cancelled (See the Microsoft Talisman page for details).

Direct3D 7.0

[edit]

DirectX 7.0 (released in September, 1999) introduced the .dds texture format[28] and support for transform and lighting hardware acceleration[29] (first available on PC hardware with Nvidia's GeForce 256), as well as the ability to allocate vertex buffers in hardware memory. Hardware vertex buffers represent the first substantive improvement over OpenGL in DirectX history. Direct3D 7.0 also augmented DirectX support for multitexturing hardware, and represents the pinnacle of fixed-function multitexture pipeline features: although powerful, it was so complicated to program that a new programming model was needed to expose the shading capabilities of graphics hardware. Direct3D 7.0 also introduced DXVA features.

Direct3D 8.0

[edit]

DirectX 8.0 (released in November, 2000) introduced programmability in the form of vertex and pixel shaders, enabling developers to write code without worrying about superfluous hardware state.[30] The complexity of the shader programs depended on the complexity of the task, and the display driver compiled those shaders to instructions that could be understood by the hardware. Direct3D 8.0 and its programmable shading capabilities were the first major departure from an OpenGL-style fixed-function architecture, where drawing is controlled by a complicated state machine. Direct3D 8.0 also eliminated DirectDraw as a separate API.[31][32] Direct3D subsumed all remaining DirectDraw API calls still needed for application development, such as Present(), the function used to display rendering results.

Direct3D was not considered to be user friendly, but as of DirectX version 8.1, many usability problems were resolved. Direct3D 8 contained many powerful 3D graphics features, such as vertex shaders, pixel shaders, fog, bump mapping and texture mapping.

Direct3D 9

[edit]

Direct3D 9.0[33] (released in December, 2002) added a new version of the High Level Shader Language[34][35] support for floating-point texture formats, Multiple Render Targets (MRT),[36] Multiple-Element Textures,[37] texture lookups in the vertex shader and stencil buffer techniques.[38]

Direct3D 9Ex

[edit]

Direct3D 9Ex[39] (previously versioned 9.0L, with "L" standing for Longhorn, the codename for Windows Vista), an extension only available on Windows Vista and newer, allows the use of the advantages offered by Windows Vista's Windows Display Driver Model (WDDM) and is used for Windows Aero.[40] Direct3D 9Ex, in conjunction with DirectX 9 class WDDM drivers allows graphics memory to be virtualized and paged out to system memory, allows graphics operations to be interrupted and scheduled and allow DirectX surfaces to be shared across processes.[41] Direct3D 9Ex was previously known as version 1.0 of Windows Graphics Foundation (WGF).

Direct3D 9Ex improvements - Win32 apps

Direct3D 10

[edit]

Windows Vista includes a major update to the Direct3D API. Originally called WGF 2.0 (Windows Graphics Foundation 2.0), then DirectX 10 and DirectX Next, Direct3D 10[42] features an updated shader model 4.0 and optional interruptibility for shader programs.[41] In this model shaders still consist of fixed stages as in previous versions, but all stages support a nearly unified interface, as well as a unified access paradigm for resources such as textures and shader constants. The language itself has been extended to be more expressive, including integer operations, a greatly increased instruction count, and more C-like language constructs. In addition to the previously available vertex and pixel shader stages, the API includes a geometry shader stage that breaks the old model of one vertex in/one vertex out, to allow geometry to be generated from within a shader, thus allowing for complex geometry to be generated entirely by the graphics hardware.

Windows XP and earlier are not supported by DirectX 10.0 and above. Furthermore, Direct3D 10 dropped support for the retained mode API which had been a part of Direct3D since the beginning, making Windows Vista incompatible with 3D games that had used the retained mode API as their rendering engine.[43]

Unlike prior versions of the API, Direct3D 10 no longer uses "capability bits" (or "caps") to indicate which features are supported on a given graphics device. Instead, it defines a minimum standard of hardware capabilities which must be supported for a display system to be "Direct3D 10 compatible". This is a significant departure, with the goal of streamlining application code by removing capability-checking code and special cases based on the presence or absence of specific capabilities.

Because Direct3D 10 hardware was comparatively rare after the initial release of Windows Vista and because of the massive install base of non-Direct3D 10 compatible graphics cards, the first Direct3D 10-compatible games still provide Direct3D 9 render paths. Examples of such titles are games originally written for Direct3D 9 and ported to Direct3D 10 after their release, such as Company of Heroes, or games originally developed for Direct3D 9 with a Direct3D 10 path retrofitted later during their development, such as Hellgate: London or Crysis. The DirectX 10 SDK became available in February 2007.[44]

Direct3D 10.0

[edit]

Direct3D 10.0 level hardware must support the following features: the ability to process entire primitives in the new geometry-shader stage, the ability to output pipeline-generated vertex data to memory using the stream-output stage, multisampled alpha-to-coverage support, readback of a depth/stencil surface or a multisampled resource once it is no longer bound as a render target, full HLSL integration – all Direct3D 10 shaders are written in HLSL and implemented with the common-shader core, integer and bitwise shader operations, organization of pipeline state into 5 immutable state objects, organization of shader constants into constant buffers, increased number of render targets, textures, and samplers, no shader length limit, new resource types and resource formats,[45] layered runtime/API layers,[46] option to perform per-primitive material swapping and setup using a geometry shader, increased generalization of resource access using a view, removed legacy hardware capability bits (caps).

  • Fixed pipelines[47] are being done away with in favor of fully programmable pipelines (often referred to as unified pipeline architecture), which can be programmed to emulate the same.
  • New state object to enable (mostly) the CPU to change states efficiently.
  • Unified shader model enhances the programmability of the graphics pipeline. It adds instructions for integer and bitwise calculations.
  • The common shader core[48] provides a full set of IEEE-compliant 32-bit integer and bitwise operations. These operations enable a new class of algorithms in graphics hardware—examples include compression and packing techniques, FFTs, and bitfield program-flow control.
  • Geometry shaders,[49][50] which work on adjacent triangles which form a mesh.
  • Texture arrays enable swapping of textures in GPU without CPU intervention.
  • Predicated rendering allows drawing calls to be ignored based on some other conditions. This enables rapid occlusion culling, which prevents objects from being rendered if it is not visible or too far to be visible.
  • Instancing 2.0 support, allowing multiple instances of similar meshes, such as armies, or grass or trees, to be rendered in a single draw call, reducing the processing time needed for multiple similar objects to that of a single one.[51]

Direct3D 10.1

[edit]

Direct3D 10.1[52] was announced by Microsoft shortly after the release of Direct3D 10 as a minor update. The specification was finalized with the release of November 2007 DirectX SDK and the runtime was shipped with the Windows Vista SP1, which is available since mid-March 2008.

Direct3D 10.1 sets a few more image quality standards for graphics vendors, and gives developers more control over image quality.[53][54] Features include finer control over anti-aliasing (both multisampling and supersampling with per sample shading and application control over sample position) and more flexibilities to some of the existing features (cubemap arrays and independent blending modes). Direct3D 10.1 level hardware must support the following features: Multisampling has been enhanced to generalize coverage based transparency and make multisampling work more effectively with multi-pass rendering, better culling behavior – Zero-area faces are automatically culled; this affects wireframe rendering only, independent blend modes per render target, new sample-frequency pixel shader execution with primitive rasterization, increased pipeline stage bandwidth, both color and depth/stencil MSAA surfaces can now be used with CopyResource as either a source or destination, MultisampleEnable only affects line rasterization (points and triangles are unaffected), and is used to choose a line drawing algorithm. This means that some multisample rasterization from Direct3D 10 are no longer supported, Texture Sampling – sample_c and sample_c_lz instructions are defined to work with both Texture2DArrays and TextureCubeArrays use the Location member (the alpha component) to specify an array index, support for TextureCubeArrays.

  • Mandatory 32-bit floating point filtering.
  • Floating Point Rules – Uses the same IEEE-754 rules for floating-point EXCEPT 32-bit floating point operations have been tightened to produce a result within 0.5 unit-last-place (0.5 ULP) of the infinitely precise result. This applies to addition, subtraction, and multiplication. (accuracy to 0.5 ULP for multiply, 1.0 ULP for reciprocal).
  • Formats – The precision of float16 blending has increased to 0.5 ULP. Blending is also required for UNORM16/SNORM16/SNORM8 formats.
  • Format Conversion while copying between certain 32/64/128 bit prestructured, typed resources and compressed representations of the same bit widths.
  • Mandatory support for 4x MSAA for all render targets except R32G32B32A32 and R32G32B32.[55]
  • Shader model 4.1

Unlike Direct3D 10 which strictly required Direct3D 10-class hardware and driver interfaces, Direct3D 10.1 runtime can run on Direct3D 10.0 hardware using a concept of "feature levels",[56][57][58] but new features are supported exclusively by new hardware which expose feature level 10_1.

The only available Direct3D 10.1 hardware as of June 2008 were the Radeon HD 3000 series and Radeon HD 4000 series from ATI; in 2009, they were joined by Chrome 430/440GT GPUs from S3 Graphics and select lower-end models in GeForce 200 series from Nvidia. In 2011, Intel chipsets started supporting Direct3D 10.1 with the introduction of Intel HD Graphics 2000 (GMA HD).

Direct3D 11

[edit]

Direct3D 11[59] was released as part of Windows 7. It was presented at Gamefest 2008 on July 22, 2008 and demonstrated at the Nvision 08 technical conference on August 26, 2008.[60][61] The Direct3D 11 Technical Preview has been included in November 2008 release of DirectX SDK.[62] AMD previewed working DirectX11 hardware at Computex on June 3, 2009, running some DirectX 11 SDK samples.[63]

The Direct3D 11 runtime is able to run on Direct3D 9 and 10.x-class hardware and drivers using the concept of "feature levels", expanding on the functionality first introduced in Direct3D 10.1 runtime.[56][64][65] Feature levels allow developers to unify the rendering pipeline under Direct3D 11 API and make use of API improvements such as better resource management and multithreading even on entry-level cards, though advanced features such as new shader models and rendering stages will only be exposed on up-level hardware.[64][66] There are three "10 Level 9" profiles which encapsulate various capabilities of popular DirectX 9.0a cards, and Direct3D 10, 10.1, and 11 each have a separate feature level; each upper level is a strict superset of a lower level.[67]

Tessellation was earlier considered for Direct3D 10, but was later abandoned. GPUs such as Radeon R600 feature a tessellation engine that can be used with Direct3D 9/10/10.1[68][69][70] and OpenGL,[71] but it's not compatible with Direct3D 11 (according to Microsoft). Older graphics hardware such as Radeon 8xxx, GeForce 3/4 had support for another form of tesselation (RT patches, N patches) but those technologies never saw substantial use. As such, their support was dropped from newer hardware.

Microsoft has also hinted at other features such as order independent transparency, which was never exposed by the Direct3D API but supported almost transparently by early Direct3D hardware such as Videologic's PowerVR line of chips.

Direct3D 11.0

[edit]

Direct3D 11.0 features include: Support for Shader Model 5.0, Dynamic shader linking, addressable resources, additional resource types,[72] subroutines, geometry instancing, coverage as pixel shader input, programmable interpolation of inputs, new texture compression formats (1 new LDR format and 1 new HDR format), texture clamps to limit WDDM preload, require 8-bits of subtexel and sub-mip precision on texture filtering, 16K texture limits, Gather4(support for multi-component textures, support for programmable offsets), DrawIndirect, conservative oDepth, Depth Bias,[73][74] addressable stream output, per-resource mipmap clamping, floating-point viewports, shader conversion instructions, improved multithreading.

  • Shader Model 5[75]
  • Support for Tessellation[76] and Tessellation Shaders[77] to increase at runtime the number of visible polygons from a low detail polygonal model
  • Multithreaded rendering — to render to the same Direct3D device object from different threads for multi core CPUs
  • Compute shaders — which exposes the shader pipeline for non-graphical tasks such as stream processing and physics acceleration, similar in spirit to what OpenCL, Nvidia CUDA, ATI Stream, and HLSL Shader Model 5 achieve among others.[60][61]
  • Mandatory support for 4x MSAA for all render targets and 8x MSAA for all render target formats except R32G32B32A32 formats.[55]

Other notable features are the addition of two new texture compression algorithms for more efficient packing of high quality and HDR/alpha textures and an increased texture cache.

First seen in the Release Candidate version, Windows 7 integrates the first released Direct3D 11 support. The Platform Update for Windows Vista includes full-featured Direct3D 11 runtime and DXGI 1.1 update, as well as other related components from Windows 7 like WARP, Direct2D, DirectWrite, and WIC.[78][79]

Direct3D 11.1

[edit]

Direct3D 11.1[80][81] is an update to the API that ships with Windows 8.[82][83] The Direct3D runtime in Windows 8 features DXGI 1.2[84] and requires new WDDM 1.2[85] device drivers.[86] Preliminary version of the Windows SDK for Windows 8 Developer Preview was released on September 13, 2011.

The new API features shader tracing and HLSL compiler enhancements, support for minimum precision HLSL scalar data types,[87] UAVs (Unordered Access Views) at every pipeline stage, target-independent rasterization (TIR), option to map SRVs of dynamic buffers with NO_OVERWRITE, shader processing of video resources, option to use logical operations in a render target, option to bind a subrange of a constant buffer to a shader and retrieve it, option to create larger constant buffers than a shader can access, option to discard resources and resource views, option to change subresources with new copy options, option to force the sample count to create a rasterizer state, option to clear all or part of a resource view, option to use Direct3D in Session 0 processes, option to specify user clip planes in HLSL on feature level 9 and higher, support for shadow buffer on feature level 9, support for video playback, extended support for shared Texture2D resources, and on-the-fly swapping between Direct3D 10 and 11 contexts and feature levels. Direct3D 11.1 includes new feature level 11_1, which brings minor updates to the shader language, such as larger constant buffers and optional double-precision instructions, as well as improved blending modes and mandatory support for 16-bit color formats to improve the performance of entry-level GPUs such as Intel HD Graphics.[86][88] WARP has been updated to support feature level 11_1.

The Platform Update for Windows 7 includes a limited set of features from Direct3D 11.1, though components that depend on WDDM 1.2 – such as feature level 11_1 and its related APIs, or quad buffering for stereoscopic rendering – are not present.[89][90]

Direct3D 11.2

[edit]

Direct3D 11.2[91][92][93] was shipped with Windows 8.1.[94][95] New hardware features require DXGI 1.3[96] with WDDM 1.3[97] drivers and include runtime shader modification and linking, Function linking graph(FLG), inbox HLSL compiler, option to annotate graphics commands.[98] Feature levels 11_0 and 11_1 introduce optional support for tiled resources with shader level of detail clamp (Tier2).[99] The latter feature effectively provides control over the hardware page tables present in many current GPUs.[100] WARP was updated to fully support the new features.[94][101] There is no feature level 11_2 however; the new features are dispersed across existing feature levels. Those that are hardware-dependent can be checked individually via CheckFeatureSupport.[95][102] Some of the "new" features in Direct3D 11.2 actually expose some old hardware features in a more granular way; for example D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT exposes partial support for instancing on feature level 9_1 and 9_2 hardware, otherwise fully supported from feature level 9_3 onward.[103]

Direct3D 11.X

Direct3D 11.X is a superset of DirectX 11.2 running on the Xbox One.[104][105] It includes some features, such as draw bundles, that were later announced as part of DirectX 12.[106]

Direct3D 11.3

[edit]

Direct3D 11.3[107] shipped in July 2015 with Windows 10; it includes minor rendering features from Direct3D 12, while keeping the overall structure of the Direct3D 11.x API.[108][109][110] Direct3D 11.3 introduces optional Shader Specified Stencil Reference Value, Typed Unordered Access View Loads, Rasterizer Ordered Views (ROVs), optional Standard Swizzle, optional Default Texture Mapping, Conservative Rasterization (out of three tiers),[111] optional Unified Memory Access (UMA) support, and additional Tiled Resources (tier 2) (Volume tiled resources).[112]

Direct3D 11.4

[edit]
  • Direct3D 11.4 version 1511 – Initial Direct3D 11.4 was introduced with Windows 10 Threshold 2 update (version 1511) improving external graphics adapters support and DXGI 1.5.[113]
  • Direct3D 11.4 version 1607 – Updated Direct3D 11.4 with Windows 10 Anniversary Update (version 1607) includes support WDDM 2.1 and for UHDTV HDR10 format (ST 2084) and variable refresh rates support for UWP applications.

Direct3D 12

[edit]

Direct3D 12[114] allows a lower level of hardware abstraction than earlier versions, enabling future applications to significantly improve multithreaded scaling and decrease CPU utilization. This is achieved by better matching the Direct3D abstraction layer with the underlying hardware, through new features such as Indirect Drawing, descriptor tables, concise pipeline state objects, and draw call bundles. Reducing driver overhead is the main attraction of Direct3D 12, similarly to AMD's Mantle.[114] In the words of its lead developer Max McMullen, the main goal of Direct3D 12 is to achieve "console-level efficiency" and improved CPU parallelism.[115][116][117]

Although Nvidia has announced broad support for Direct3D 12, they were also somewhat reserved about the universal appeal of the new API, noting that while game engine developers may be enthusiastic about directly managing GPU resources from their application code, "a lot of [other] folks wouldn't" be happy to have to do that.[118]

Some new hardware features are also in Direct3D 12,[110][119][120] including Shader Model 5.1,[121] Volume Tiled Resources(Tier 2),[121] Shader Specified Stencil Reference Value, Typed UAV Load, Conservative Rasterization(Tier 1), better collision and culling with Conservative Rasterization, Rasterizer Ordered Views (ROVs), Standard Swizzles, Default Texture Mapping, Swap Chains, swizzled resources and compressed resources,[122] additional blend modes,[123] programmable blend and efficient order-independent transparency (OIT) with pixel ordered UAV.[124]

Pipeline state objects (PSOs)[125] have evolved from Direct3D 11, and the new concise pipeline states mean that the process has been simplified. DirectX 11 offered flexibility in how its states could be altered, to the detriment of performance. Simplifying the process and unifying the pipelines (e.g. pixel shader states) lead to a more streamlined process, significantly reducing the overheads and allowing the graphics card to draw more calls for each frame. Once created, the PSO is immutable.[126]

Root signatures introduce configurations to link command lists to resources required by shaders. They define the layout of resources that shaders will use and specifies what resources will be bound to the pipeline. A graphics command list has both a graphics and compute root signature, while a compute command list will have only a compute root signature. These root signatures are completely independent of each other. While the root signature lays out the types of data for shaders to use, it does not define or map the actual memory or data.[127]

Root parameters are one type of entry in a root signature. The actual values of the root parameters that are modified at runtime are called root arguments. This is the data that the shaders read.[127]

Within Direct3D 11, the commands are sent from the CPU to the GPU one by one, and the GPU works through these commands sequentially. This means that commands are bottlenecked by the speed at which the CPU could send these commands in a linear fashion. Within DirectX 12 these commands are sent as command lists, containing all the required information within a single package. The GPU is then capable of computing and executing this command in one single process, without having to wait on any additional information from the CPU.

Within these command lists are bundles. Where previously commands were just taken, used, and then forgotten by the GPU, bundles can be reused. This decreases the workload of the GPU and means repeated assets can be used much faster.

While resource binding is fairly convenient in Direct3D 11 for developers at the moment, its inefficiency means several modern hardware capabilities are being drastically underused. When a game engine needed resources in DX11, it had to draw the data from scratch every time, meaning repeat processes and unnecessary uses. In Direct3D 12, descriptor heaps and tables mean the most often used resources can be allocated by developers in tables, which the GPU can quickly and easily access. This can contribute to better performance than Direct3D 11 on equivalent hardware, but it also entails more work for the developer.

Dynamic Heaps are also a feature of Direct3D 12.[128]

Direct3D 12 features explicit multi-adapter support, allowing the explicit control of multiple GPUs (mGPU) configuration systems. Such configurations can be built with graphics adapter of the same hardware vendor as well of different hardware vendor together.[129]

An experimental support of D3D 12 for Windows 7 SP1 has been released by Microsoft in 2019 via a dedicated NuGet package.[130][131][132]

  • Direct3D 12 version 1607 – With the Windows 10 anniversary update (version 1607), released on August 2, 2016, the Direct3D 12 runtime has been updated to support constructs for explicit multithreading and inter-process communication, allowing developers to take advantage of modern massively parallel GPUs.[133] Other features include updated root signatures version 1.1, as well as support for HDR10 format and variable refresh rates.
  • Direct3D 12 version 1703 – With the Windows 10 Creators Update (version 1703), released on April 11, 2017, the Direct3D 12 runtime has been updated to support Shader Model 6.0 and DXIL. and Shader Model 6.0 requires Windows 10 Anniversary Update (version 1607), WDDM 2.1. New graphical features are Depth Bounds Testing and Programmable MSAA.[134]
  • Direct3D 12 version 1709 – Direct3D in Windows 10 Fall Creators Update (version 1709), released on October 17, 2017, includes improved debugging.[134]
  • Direct3D 12 version 1809 – Windows 10 October 2018 Update (version 1809) brings support for DirectX Raytracing so GPUs can benefit from its API.
  • Direct3D 12 version 1903 – Windows 10 May 2019 Update (version 1903) brings support for DirectML and NPUs.[135][136] DirectML can support both compute shaders and tensor shaders.[citation needed]
  • Direct3D 12 version 2004 – Windows 10 May 2020 Update (version 2004) brings support for DirectX 12 Ultimate, Mesh & Amplification Shaders,[137] Sampler Feedback,[138] as well DirectX Raytracing Tier 1.1[139] and memory allocation improvements.[140]
  • Direct3D 12 version 21H2 – Windows 10 version 21H2 and Windows 11 version 21H2 brings support for DirectStorage.

Architecture

[edit]
Abstract Layer

Direct3D is a Microsoft DirectX API subsystem component. The aim of Direct3D is to abstract the communication between a graphics application and the graphics hardware drivers. It is presented like a thin abstract layer at a level comparable to GDI (see attached diagram). Direct3D contains numerous features that GDI lacks.

Direct3D is an Immediate mode graphics API. It provides a low-level interface to every video card 3D function (transformations, clipping, lighting, materials, textures, depth buffering and so on). It once had a higher level Retained mode component, now officially discontinued.

Direct3D immediate mode presents three main abstractions: devices, resources and Swap Chains (see attached diagram). Devices are responsible for rendering the 3D scene. They provide an interface with different rendering capabilities. For example, the mono device provides white and black rendering, while the RGB device renders in color. There are four types of devices:

Device
  • Reference device: Simulates new functions not yet available in hardware. It is necessary to install the Direct3D SDK to use this device type.
  • Null reference device: Does nothing. This device is used when the SDK is not installed and a reference device is requested.
  • Pluggable software device: Performs software rendering. This device was introduced with DirectX 9.0.[141]

Every device contains at least one swap chain. A swap chain is made up of one or more back buffer surfaces. Rendering occurs in the back buffer.

Moreover, devices contain a collection of resources; specific data used during rendering. Each resource has four attributes:

  • Type: Determines the type of resource: surface, volume, texture, cube texture, volume texture, surface texture, index buffer or vertex buffer.
  • Pool:[142] Describes how the resource is managed by the runtime and where it is stored. In the Default pool the resource will exist only in device memory. Resources in the managed pool will be stored in system memory, and will be sent to the device when required. Resources in system memory pool will only exist in system memory. Finally, the scratch pool is basically the same as the system memory pool, but resources are not bound by hardware restrictions.
  • Format: Describes the layout of the resource data in memory. For example, D3DFMT_R8G8B8 format value means a 24 bits color depth (8 bits for red, 8 bits for green and 8 bits for blue).
  • Usage: Describes, with a collection of flag bits, how the resource will be used by the application. These flags dictate which resources are used in dynamic or static access patterns. Static resource values don't change after being loaded, whereas dynamic resource values may be modified.

Direct3D implements two display modes:

  • Fullscreen mode: The Direct3D application generates all of the graphical output for a display device. In this mode Direct3D automatically captures Alt-Tab and sets/restores screen resolution and pixel format without the programmer intervention. This also provides plenty of problems for debugging due to the 'Exclusive Cooperative Mode'.[citation needed]
  • Windowed mode: The result is shown inside the area of a window. Direct3D communicates with GDI to generate the graphical output in the display. Windowed mode can have the same level of performance as full-screen, depending on driver support.

Pipeline

[edit]
Direct3D 11 graphics pipeline process

The Microsoft Direct3D 11 API defines a process to convert a group of vertices, textures, buffers, and state into an image on the screen. This process is described as a rendering pipeline with several distinct stages. The different stages of the Direct3D 11 pipeline are:[143]

  1. Input-Assembler:[144] Reads in vertex data from an application supplied vertex buffer and feeds them down the pipeline.
  2. Vertex Shader:[145] Performs operations on a single vertex at a time, such as transformations, skinning, or lighting.
  3. Hull-Shader:[146] Performs operations on sets of patch control points, and generates additional data known as patch constants.
  4. Tessellator:[147] Subdivides geometry to create higher-order representations of the hull.
  5. Domain-Shader:[148] Performs operations on vertices output by the tessellation stage, in much the same way as a vertex shader.
  6. Geometry Shader:[149] Processes entire primitives such as triangles, points, or lines. Given a primitive, this stage discards it, or generates one or more new primitives.
  7. Stream-Output:[150] Can write out the previous stage's results to memory. This is useful to recirculate data back into the pipeline.
  8. Rasterizer:[151][152] Converts primitives into pixels, feeding these pixels into the pixel shader. The Rasterizer may also perform other tasks such as clipping what is not visible, or interpolating vertex data into per-pixel data.
  9. Pixel Shader:[153] Determines the final pixel color to be written to the render target and can also calculate a depth value to be written to the depth buffer.
  10. Output-Merger:[154] Merges various types of output data (pixel shader values, alpha blending, depth/stencil...) to build the final result.

The pipeline stages illustrated with a round box are fully programmable. The application provides a shader program that describes the exact operations to be completed for that stage. Many stages are optional and can be disabled altogether.

Feature levels

[edit]

In Direct3D 5 to 9, when new versions of the API introduced support for new hardware capabilities, most of them were optional – each graphics vendor maintained their own set of supported features in addition to the basic required functionality. Support for individual features had to be determined using "capability bits" or "caps", making cross-vendor graphics programming a complex task.

Direct3D 10 introduced a much simplified set of mandatory hardware requirements based on most popular Direct3D 9 capabilities which all supporting graphics cards had to adhere to, with only a few optional capabilities for supported texture formats and operations.

Direct3D 10.1 added a few new mandatory hardware requirements, and to remain compatible with 10.0 hardware and drivers, these features were encapsulated in two sets called "feature levels", with 10.1 level forming a superset of 10.0 level. As Direct3D 11.0, 11.1 and 12 added support for new hardware, new mandatory capabilities were further grouped in upper feature levels.[56]

Direct3D 11 also introduced "10level9", a subset of the Direct3D 10 API with three feature levels encapsulating various Direct3D 9 cards with WDDM drivers, and Direct3D 11.1 re-introduced a few optional features for all levels,[155] which were expanded in Direct3D 11.2 and later versions.

This approach allows developers to unify the rendering pipeline and use a single version of the API on both newer and older hardware, taking advantage of performance and usability improvements in the newer runtime.[60]

New feature levels are introduced with updated versions of the API and typically encapsulate:

  • major mandatory features – (Direct3D 11.0, 12),
  • a few minor features (Direct3D 10.1, 11.1), or
  • a common set of previously optional features (Direct3D 11.0 "10 level 9").

Each upper level is a strict superset of a lower level, with only a few new or previously optional features that move to the core functionality on an upper level.[67] More advanced features in a major revision of the Direct3D API such as new shader models and rendering stages are only exposed on up-level hardware.[65][66]

Separate capabilities exist to indicate support for specific texture operations and resource formats; these are specified per each texture format using a combination of capability flags.[156][157]

Feature levels use underscore as a delimiter (i.e. "12_1"), while API/runtime versions use dot (i.e. "Direct3D 11.4").

Direct3D 11 levels

[edit]

In Direct3D 11.4 for Windows 10, there are nine feature levels provided by D3D_FEATURE_LEVEL structure; levels 9_1, 9_2 and 9_3 (collectively known as Direct3D 10 Level 9) re-encapsulate various features of popular Direct3D 9 cards, levels 10_0, 10_1 refer to respective legacy versions of Direct3D 10,[65] 11_0 and 11_1 reflects the feature introduced with Direct3D 11 and Direct3D 11.1 APIs and runtimes, while levels 12_0 and 12_1 correspond the new feature levels introduced with the Direct3D 12 API.

Feature levels in Direct3D 11.4
Feature level Mandatory hardware features Optional features
9_1 Shader Model 2.0 (vs_2_0/ps_2_0), 2K textures, volume textures, event queries, BC1-3 (a.k.a. DXTn), a few other specific capabilities.
9_2 Occlusion queries, floating-point formats (no blending), extended caps, all 9_1 features.
9_3 vs_2_a/ps_2_x with instancing and additional shader caps, 4K textures, multiple render targets (4 MRTs), floating-point blending (limited), all 9_2 features.
10_0 Shader Model 4.0, geometry shader, stream out, alpha-to-coverage, 8K textures, MSAA textures, 2-sided stencil, general render target views, texture arrays, BC4/BC5, full floating-point format support, all 9_3 features. Logical blend operations, DirectCompute (CS 4.0/4.1), extended pixel formats.[155]
10_1 Shader Model 4.1, cubemap arrays, extended MSAA, all 10_0 features.
11_0 Shader Model 5.0/5.1, hull & domain shaders, DirectCompute (CS 5.0/5.1), 16K textures, BC6H/BC7, extended pixel formats, all 10_1 features. UAV only rendering with force sample count, constant buffer offsetting and partial updates, double precision (64-bit) floating point operations, minimum floating-point precision (10- or 16-bit), min/max filtering.
11_1 Logical blend operations, target-independent rasterization, UAVs at every pipeline stage with increased slot count, UAV only rendering with force sample count, constant buffer offsetting and partial updates, all 11_0 features. Tiled resources (four tiers), conservative rasterization (three tiers), stencil reference value from Pixel Shader, rasterizer ordered views, typed UAV loads for additional formats.
12_0 Tiled Resources Tier 2 (Texture2D), Typed UAV Loads (additional formats).
12_1 Conservative Rasterization Tier 1, Rasterizer Ordered Views.

Direct3D 12 levels

[edit]

Direct3D 12 for Windows 10 requires graphics hardware conforming to feature levels 11_0 and 11_1 which support virtual memory address translations and requires WDDM 2.0 drivers. There are two new feature levels, 12_0 and 12_1, which include some new features exposed by Direct3D 12 that are optional on levels 11_0 and 11_1.[158] Some previously optional features are realigned as baseline on levels 11_0 and 11_1. Shader Model 6.0 has been released with Windows 10 Creators Update and requires Windows 10 Anniversary Update, WDDM 2.1 drivers.

Direct3D 12 feature levels
Level Mandatory features Optional features
11_0 All mandatory 11_0 features from Direct3D 11, Shader Model 5.1, Resource binding Tier 1. Logical blend operations, double precision (64-bit) floating point operations, minimum floating point precision (10- or 16-bit).

Resource binding (three tiers), tiled resources (four tiers), conservative rasterization (three tiers), stencil reference value from Pixel Shader, rasterizer ordered views, typed UAV loads for additional formats, view instancing.

Shader Model 6.0–6.7

Metacommands, variable shading rate, raytracing, mesh shaders, sampler feedback.

Other optional features.[159]

UAVs at every pipeline stage, UAV only rendering with force sample count, constant buffer offsetting and partial updates.
11_1 Logical blend operations, target-independent rasterization, increased UAV slot count.
12_0 Resource Binding Tier 2, Tiled Resources Tier 2 (Texture2D), Typed UAV Loads (additional formats), Shader Model 6.0.
12_1 Conservative Rasterization Tier 1, Rasterizer Ordered Views.
12_2 DirectX 12 Ultimate: Shader Model 6.5, Raytracing Tier 1.1, Mesh Shaders, Variable-Rate Shading, Sampler Feedback, Resource Binding Tier 3, Tiled Resources Tier 3 (Texture3D), Conservative Rasterization Tier 3, 40-bit virtual address space.

Direct3D 12 introduces a revamped resource binding model which allows explicit control of memory. Abstract "resource view" objects[160] are now represented with resource descriptors, which are allocated using memory heaps and tables.[161] Resource Binding tiers define maximum number of resources that can be addressed using CBV (constant buffer view), SRV (shader resource view) and UAV (unordered access view), as well as texture sampler units. Tier 3 hardware allows fully bindless resources only restricted by the size of the descriptor heap, while Tier 1 and Tier 2 hardware impose some limits on the number of descriptors ("views") that can be used simultaneously.[162][163]

Resource binding tiers
Resource limits Tier 1 Tier 2 Tier 3
Descriptors in CBV/SRV/UAV heap 1M 1M >1M
CBVs per shader stage 14 14 full heap
SRVs per shader stage 128 full heap
UAVs across all stages 8, 64 64 full heap
Samplers per shader stage 16 full heap
64 slots on feature level 11_1 hardware

Multithreading

[edit]

WDDM driver model in Windows Vista and higher supports arbitrarily large number of execution contexts (or threads) in hardware or in software. Windows XP only supported multitasked access to Direct3D, where separate applications could execute in different windows and be hardware accelerated, and the OS had limited control about what the GPU could do and the driver could switch execution threads arbitrarily.

The ability to execute the runtime in a multi-threaded mode has been introduced with Direct3D 11 runtime. Each execution context is presented with a resource view of the GPU. Execution contexts are protected from each other, however a rogue or badly written app can take control of the execution in the user-mode driver and could potentially access data from another process within GPU memory by sending modified commands. Though protected from access by another app, a well-written app still needs to protect itself against failures and device loss caused by other applications.

The OS manages the threads all by itself, allowing the hardware to switch from one thread to the other when appropriate, and also handles memory management and paging (to system memory and to disk) via integrated OS-kernel memory management.

Finer-grained context switching, i.e. being able to switch two execution threads at the shader-instruction level instead of the single-command level or even batch of commands, was introduced in WDDM/DXGI 1.2 which shipped with Windows 8.[86] This overcomes a potential scheduling problem when application would have very long execution of a single command/batch of commands and will have to be terminated by the OS watchdog timer.[164]

WDDM 2.0 and DirectX 12 have been reengineered to allow fully multithreaded draw calls. This was achieved by making all resources immutable (i.e. read-only), serializing the rendering states and using draw call bundles. This avoids complex resource management in the kernel-mode driver, making possible multiple reentrant calls to the user-mode driver via concurrent executions contexts supplied by separate rendering threads in the same application.

Direct3D Mobile

[edit]

Direct3D Mobile is derived from Direct3D but has a smaller memory footprint. Windows CE provides Direct3D Mobile support.[165]

Alternative implementations

[edit]

The following alternative implementations of Direct3D API exist. They are useful for non-Windows platforms and for hardware without some versions of DX support:

  • WineD3D – The Wine open source project has working implementations of the Direct3D APIs via translation to OpenGL.[166] Wine's implementation can also be run on Windows under certain conditions.[167]
  • vkd3d – vkd3d is an open source 3D graphics library built on top of Vulkan which allows to run Direct3D 12 applications on top of Vulkan.[168] It's primarily used by the Wine project,[169][170] and is now included with Valve's Proton project bundled with Steam on Linux.
  • DXVK – An open source Vulkan-based translation layer for Direct3D 8/9/10/11 which allows running 3D applications on Linux using Wine.[171][172] It is used by Proton/Steam[173] for Linux. DXVK is able to run a large number of modern Windows games under Linux.
    • D9VK – An obsolete fork of DXVK for adding Direct3D 9 support,[174] included with Steam/Proton on Linux.[175] On December 16, 2019 D9VK was merged into DXVK.[176]
    • D8VK – An obsolete fork of DXVK for adding Direct3D 8 support on Linux.[177] It was merged with DXVK version 2.4 which was released on July 10, 2024.
  • Gallium Nine – Gallium Nine makes it possible to run Direct3D 9 applications on Linux natively, i.e. without any calls translation which allows for a near native speed. It depends on Wine and Mesa.[178][179]
[edit]

D3DX

[edit]

Direct3D comes with D3DX, a library of tools designed to perform common mathematical calculations on vectors, matrices and colors, calculating look-at and projection matrices, spline interpolations, and several more complicated tasks, such as compiling or assembling shaders used for 3D graphic programming, compressed skeletal animation storage and matrix stacks. There are several functions that provide complex operations over 3D meshes like tangent-space computation, mesh simplification, precomputed radiance transfer, optimizing for vertex cache friendliness and stripification, and generators for 3D text meshes. 2D features include classes for drawing screen-space lines, text and sprite based particle systems. Spatial functions include various intersection routines, conversion from/to barycentric coordinates and bounding box/sphere generators. D3DX is provided as a dynamic link library (DLL). D3DX is deprecated from Windows 8 onward and can't be used in Windows Store apps.[180]

Some features present in previous versions of D3DX were removed in Direct3D 11 and now provided as separate sources:[181]

  • Windows SDK and Visual Studio[182]
  • A large part of the math library has been removed. Microsoft recommends use of the DirectX Math library instead.
  • Spherical harmonics math has been removed and is now distributed as source.[183]
  • The Effect framework has been removed and is now distributed as source via CodePlex.[184]
  • The Mesh interface and geometry functions have been removed and are now distributed as source via CodePlex under DirectXMesh geometry processing library.[185]
  • Texture functions have been removed and are now distributed as source via CodePlex under DirectXTex texture processing library.[186]
  • General helpers have been removed and are now distributed as source via CodePlex under DirectX Tool Kit (DirectXTK) project.[187]
  • The isochart texture atlas has been removed and is now distributed as source via CodePlex under UVAtlas project.[188]

DXUT

[edit]

DXUT (also called the sample framework) is a layer built on top of the Direct3D API. The framework is designed to help the programmer spend less time with mundane tasks, such as creating a window, creating a device, processing Windows messages and handling device events. DXUT have been removed with the Windows SDK 8.0 and now distributed as source via CodePlex.[189]

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
Direct3D is a low-level application programming interface () developed by as part of the multimedia framework, designed to enable developers to render 3D primitives using the GPU rendering pipeline or execute parallel compute operations via shaders. Introduced in 1996 as a component of DirectX 2.0, it provides direct access to graphics hardware for creating immersive 3D visuals in applications such as video games, simulations, and scientific software. Over nearly three decades, Direct3D has undergone significant evolution to keep pace with GPU advancements, progressing from fixed-function pipelines in early versions to fully programmable shaders starting with Direct3D 8 in 2000 and enhanced in Direct3D 9. Subsequent iterations, including Direct3D 10 (2006) and Direct3D 11 (2009), introduced features like geometry shaders, for detailed surfaces, and improved resource management through integration with DXGI for cross-process texture sharing. The current major version, Direct3D 12, launched in 2015 alongside , emphasizes low-level hardware control with command lists and bundles for efficient workload submission, reduced CPU overhead, and support for advanced rendering techniques like ray tracing via extensions such as (DXR). Developers program shaders in Direct3D using High-Level Shading Language (HLSL), which compiles to GPU-executable bytecode, ensuring compatibility across diverse hardware through feature levels that allow fallback to older capabilities. As a core element of the Windows graphics ecosystem, Direct3D coexists with higher-level APIs like for 2D rendering and supports interoperability for hybrid applications, while ongoing updates via the DirectX 12 Agility SDK enable runtime access to the latest GPU features without requiring full redesigns. This architecture has powered thousands of titles and applications, establishing Direct3D as the for high-performance 3D graphics on Windows platforms.

Introduction

Overview

Direct3D is Microsoft's low-level application programming interface (API) for hardware-accelerated 3D graphics rendering, serving as a core component of the multimedia suite, with Direct3D first introduced in 1996 as part of DirectX 2.0. It enables developers to leverage (GPU) capabilities for creating immersive visual experiences in software applications. The primary purposes of Direct3D include accelerating 3D graphics rendering in video games, scientific simulations, and visualizations by providing direct access to GPU hardware features such as , , and . This integration within the Windows ecosystem allows for efficient handling of complex scenes with high frame rates and realistic effects. As a proprietary developed by , Direct3D contrasts with , an open-standard alternative maintained by the , by prioritizing deep integration with Windows and platforms over cross-platform portability. In its fundamental workflow, applications issue draw calls through the , which translates these instructions into low-level GPU commands for execution. As of 2025, Direct3D continues to dominate Windows PC gaming, powering over 85% of titles and supporting the industry's shift toward advanced rendering techniques across its evolving versions.

Development History

Direct3D originated as a core component of Microsoft's DirectX multimedia API suite, initiated in late 1994 under "Project Manhattan" by a small team including Alex St. John, Craig Eisler, and Eric Engstrom, aimed at simplifying game development for the upcoming Windows 95 operating system and countering the dominance of OpenGL in 3D graphics programming. DirectX was first released as version 1.0 in September 1995 alongside the Windows Game SDK. Direct3D was introduced in DirectX 2.0 in 1996, providing low-level hardware access for 3D rendering, marking Microsoft's strategic push to establish Windows as a premier gaming platform by bypassing the limitations of earlier APIs like WinG and directly competing with cross-platform standards like OpenGL. Direct3D became available with the release of 2.0 in 1996, enabling developers to leverage emerging 3D accelerators from partners like ATI and for early 3D titles on and later. By 5.0 in August 1997, Direct3D underwent a significant architectural shift, de-emphasizing the high-level in favor of the more efficient immediate mode , which offered greater control and performance for real-time applications while simplifying scene management. This evolution continued with 7.0 in September 1999, introducing hardware-accelerated transform and lighting (T&L), which offloaded complex geometry calculations from the CPU to dedicated 3D hardware, responding to innovations from and ATI in consumer GPUs like the GeForce 256. Strategic pivots in the early 2000s reflected the rise of programmable graphics hardware; Direct3D 8.0, released in November 2000, embraced this by adding support for vertex and shaders, allowing developers to customize rendering pipelines and achieve more realistic effects, directly influenced by NVIDIA's shader-capable . Later, Direct3D 10 in 2006 represented a comprehensive redesign tied to , focusing on reducing driver overhead through a streamlined that minimized state validation and CPU bottlenecks, enabling better multi-core utilization amid advancing hardware parallelism. Post-2010 developments built on these foundations to align with console ecosystems and cutting-edge hardware; Direct3D 11, launched in October 2009 with , introduced hardware stages to dynamically generate detailed geometry, enhancing performance for complex scenes in response to GPU advancements from and . Direct3D 12, released in July 2015 alongside , shifted toward low-level hardware access, granting applications explicit control over GPU resources to reduce latency and improve , mirroring the direct hardware model in Microsoft's consoles. In the , updates culminated in Direct3D 12 Ultimate, announced in March 2020 and available by holiday that year, incorporating (DXR) for real-time ray-traced lighting and reflections, driven by ray-tracing hardware from 's RTX series and 's RDNA architectures to unify PC and console graphics capabilities. In 2025, Microsoft announced 1.2, enhancing ray tracing performance by up to 40% in complex scenes and introducing support for neural rendering techniques.

Version Evolution

Early Versions (1.0 to 7.0)

Direct3D's early versions, spanning from 1.0 to 7.0, laid the groundwork for hardware-accelerated 3D graphics on Windows platforms during the mid-to-late , evolving from rudimentary software-based rendering to support for emerging GPU capabilities. These releases focused on a fixed-function , where the CPU managed most geometric transformations and lighting calculations, gradually integrating through partnerships with vendors like . This era marked Direct3D's transition from a niche to a cornerstone for PC gaming, though it was constrained by the era's hardware limitations and API design choices that prioritized compatibility over efficiency. Direct3D 1.0, released on June 2, 1996, as part of 2.0, provided a basic fixed-function pipeline optimized for Windows 95. It emphasized rendering, leveraging the RenderMorphics Reality Lab library acquired by , which allowed scene graphs for managing complex 3D hierarchies in software. Hardware support was minimal, relying on early accelerators, and the integrated with for 2D/3D surface management, enabling simple polygonal rendering without advanced effects. Execute buffers were introduced for immediate mode, allowing batched rendering commands. Direct3D 2.0, launched on June 5, 1996, in 2.0, enhanced capabilities and introduced alpha blending for translucent effects, improving visual fidelity in games. It deepened integration with for shared surface handling, allowing smoother transitions between 2D overlays and 3D scenes, and supported bilinear on compatible hardware like the Voodoo. These updates addressed feedback from early adopters, reducing some rendering artifacts while maintaining with Direct3D 1.0. Direct3D 3.0, released on September 15, 1996, within 3.0, optimized execute buffers for complex scenes and added initial support for multi-pass multi-texturing on hardware like the Rendition VÉRITÉ, along with an MMX-optimized software rasterizer for CPUs and RAMP mode for palette-based colors. Execute buffers proved useful for but highlighted the 's growing complexity. Direct3D 4.0, planned for early 1997 as a minor update, focused on enhancements to improve depth sorting accuracy and reduce occlusion errors in polygonal scenes. However, it was short-lived and ultimately canceled due to an impending overhaul, with opting to consolidate changes into the more ambitious 5.0 release amid developer feedback on instability and limited hardware adoption. Direct3D 5.0, shipped on August 4, 1997, in 5.0, shifted emphasis to immediate mode rendering with the introduction of vertex buffers and the DrawPrimitive API, allowing direct submission of vertex data without execute buffers for lower latency. This version prioritized hardware rasterization, supporting faster primitive drawing on GPUs like the 3dfx Voodoo2, and improved image quality through better fog and lighting models, marking a pivot toward performance-critical applications. Direct3D 6.0, released on August 7, 1998, as part of 6.0, standardized multitexturing in single-pass operations and added buffers for advanced masking effects like shadows. It included , texture compression, and W-buffering alternatives to for improved depth precision on hardware such as NVIDIA's . These features optimized for contemporary GPUs, enhancing efficiency in texture-heavy scenes while retaining software fallbacks. Direct3D 7.0, unveiled in September 1999 with 7.0, introduced hardware transform and lighting (T&L), offloading vertex processing from the CPU to GPUs like NVIDIA's GeForce 256. It also added AGP texture acceleration for faster memory transfers via , reducing bandwidth bottlenecks, and served as the final major fixed-function release before programmable shaders. This version significantly boosted frame rates in titles like on compatible hardware. Throughout these versions, Direct3D suffered from high CPU overhead due to its retained and execute buffer models, which required frequent CPU intervention for scene management and lacked GPU programmability, limiting on multi-core systems. Compatibility with early GPUs like the Voodoo series was a strength, enabling widespread adoption, but the fixed-function approach constrained advanced effects until hardware evolution caught up.

Direct3D 8.0 and 9.0

Direct3D 8.0, released as part of DirectX 8.0 in November 2000, marked the transition to programmable graphics rendering by introducing the first vertex and pixel shaders through Shader Model 1.0 and 1.1. These shaders allowed developers to write custom code for transforming vertices and shading pixels, moving beyond the fixed-function pipeline of prior versions and enabling more sophisticated effects like procedural deformations and per-pixel lighting. Hardware support began with GPUs such as the NVIDIA GeForce 3, which provided the necessary capabilities for these programmable elements. Key enhancements in Direct3D 8.0 included support for fixed-to-floating point conversions in shaders, facilitating higher precision calculations during rendering. It also introduced multiple render targets (MRTs), allowing a single rendering pass to output to several textures simultaneously for techniques like . Anisotropic filtering was further optimized, improving texture quality at oblique angles by sampling more texels based on the viewing angle. Direct3D 9.0, released in late 2002, built on this foundation with Shader Model 2.0 (extending to profiles up to 2.0, with some hardware supporting up to 1.4 equivalents in practice), offering up to 256 instructions per shader and relative addressing for more complex algorithms. This version emphasized higher precision through full FP32 support in both vertex and pixel shaders, enabling accurate floating-point operations for realistic simulations and effects. Performance optimizations focused on reducing state changes between draw calls, minimizing overhead in shader setups and texture switches to improve frame rates on contemporary hardware. In 2004, Direct3D 9.0c extended the API with Shader Model 3.0, introducing dynamic branching and loops for conditional execution within shaders, which allowed for more efficient code paths and advanced effects like complex procedural textures. New features included , enabling the efficient rendering of multiple copies of the same mesh with varied parameters in a single draw call to reduce CPU load. Occlusion queries were added to test visibility of geometry, optimizing rendering by culling occluded objects early in the pipeline. Direct3D 9Ex, introduced in 2006 for , incorporated a multithreaded resource manager that allowed asynchronous creation and management of graphics resources across CPU cores, enhancing scalability on multi-processor systems. This version improved CPU-GPU overlap by enabling better synchronization and queuing of commands, reducing stalls and boosting overall throughput in demanding applications. Integration with the broader 9.0 framework also supported cross-compatibility with the , where the console's XDK was based on similar Direct3D 9-level APIs for shared development pipelines. These versions facilitated the adoption of advanced rendering in games, such as , which leveraged Direct3D 9.0's shaders for dynamic lighting, water reflections, and particle effects that showcased the programmable pipeline's potential.

Direct3D 10.0 and 10.1

Direct3D 10.0, introduced in November 2006 alongside , marked a fundamental redesign of the graphics API to streamline development and enhance by eliminating legacy elements and enforcing a fully programmable pipeline. This overhaul removed fixed-function functionality entirely, requiring all rendering to use shaders based on Model 4.0, which introduced a new geometry shader stage capable of processing and outputting entire primitives such as points, lines, or triangles. The across vertex, geometry, and pixel stages supported advanced operations like integer and bitwise instructions without length limits, promoting efficiency through constant buffers that minimized CPU-to-GPU data transfers. A core innovation was the use of immutable state objects to encapsulate GPU pipeline configurations, including five types—blend state, depth-stencil state, rasterizer state, sampler state, and input-layout—for rapid binding and reduced driver overhead compared to the fragmented state management in prior versions. Resource handling was generalized through shader resource views (SRVs), enabling flexible access to textures and buffers without direct resource binding, which further cut API calls and improved resource sharing across shaders. These changes collectively lowered CPU overhead by design, targeting a thin abstraction layer over hardware for more direct control. Direct3D 10.0 mandated hardware compatibility with the (WDDM) 1.0, which introduced virtual addressing and preemption for better stability and multitasking, but provided no support for pre-Direct3D 10 GPUs due to the absence of fixed-function fallbacks or capability queries. This strict requirement ensured consistent behavior across devices but excluded older systems, aligning the API closely with emerging GPU architectures from NVIDIA's and AMD's onward. Direct3D 10.1, released in 2008 with Service Pack 1 and natively supported in , built incrementally on 10.0 by refining rendering quality and flexibility without altering the core architecture. Key enhancements included improved (MSAA) through sample-frequency pixel shader execution, allowing per-sample color computations to enhance transparency effects and support multi-pass techniques more effectively. It also introduced cubic environment mapping via TextureCubeArray resources, enabling layered cube map sampling for advanced reflections, and independent blend modes per render target to allow varied blending operations across multiple outputs in a single draw call. Additional refinements encompassed higher bandwidth between stages (up to 32 registers) and support for format conversions in resource copies, including MSAA surfaces. Despite its innovations, Direct3D 10 faced limited initial adoption due to Windows Vista's driver instability, high system requirements, and exclusive availability on that OS, which deterred developers from targeting it over the more stable Direct3D 9 on . The lack of backward compatibility with older hardware was often mitigated by applications using Direct3D 9 wrappers or emulation layers to reach broader audiences. Nonetheless, Direct3D 10 established foundational principles for low-overhead rendering, influencing subsequent APIs and powering early games that leveraged its streamlined pipeline for improved efficiency.

Direct3D 11 Series (11.0 to 11.4)

Direct3D 11.0, released in 2009 alongside , introduced significant advancements in programmable shading and to enhance real-time rendering efficiency. It added tessellation shaders, consisting of hull and domain shaders, which subdivide coarse patches into finer triangles or quads on the GPU, improving detail in complex surfaces without increasing vertex counts in modeling tools. Compute shaders were also debuted, operating under Shader Model 5.0 and enabling general-purpose GPU (GPGPU) computations by treating the GPU as a parallel processor grid for tasks like physics simulations or image processing, independent of the . Enhanced further supported stream output and improved geometry shader capabilities, allowing developers to amplify vertex data dynamically for effects such as particle systems or terrain generation. Building on this foundation, Direct3D 11.1 arrived in 2012 with Windows 8, focusing on expanded resource access and integration for immersive displays. It enabled unordered access views (UAVs) at every pipeline stage, including vertex, geometry, and pixel shaders, which facilitated more flexible compute-like operations throughout rendering and reduced the need for separate compute passes. Stereoscopic 3D support was added, allowing applications to output dual views for 3D glasses or displays, enhancing depth perception in games and simulations. Constant buffers saw optimizations, such as partial updates and larger sizes up to 64 KB, streamlining data transfer to shaders and improving performance in dynamic scenes. These changes integrated seamlessly with Windows 8's runtime, providing better device context sharing for multi-monitor or multi-GPU setups. Direct3D 11.2, launched in 2013 for , emphasized memory efficiency for high-resolution assets through tiled resources, which represent large textures or buffers as sparse, on-demand loaded tiles, minimizing VRAM usage for expansive worlds like open-world games. This feature supports two tiers of implementation, with Tier 1 offering basic sparse binding and Tier 2 adding mipmapping and for more advanced streaming. Improved (MSAA) integration with tiled resources allowed for higher-quality rendering of large surfaces without proportional memory overhead. Additionally, the DirectXMath library was introduced as a lightweight, SIMD-optimized math toolkit for vector and matrix operations, aiding developers in performance-critical calculations without external dependencies. In 2016, Direct3D 11.3 with the Anniversary Update brought refinements for advanced rendering techniques, including rasterizer order views (ROVs), which permit pixel shaders to write to UAVs in a specific order relative to rasterization, enabling algorithms like without sorting. Typed UAV loads expanded to 18 formats, allowing shaders to perform atomic operations and loads on structured data more efficiently than raw buffers. Conservative rasterization was added, ensuring all pixels partially overlapped by primitives are shaded, which supports techniques like shader-based or with guaranteed coverage. Direct3D 11.4, released in 2020 as part of the May 2020 Update, enhanced robustness and , including fences for across multiple devices or with Direct3D 12 contexts, and multithreaded protection to handle device removal gracefully during hot-swaps or crashes. Extended support for NV12 textures improved video decoding pipelines, while shader caching reduced load times by persisting compiled shaders. These updates facilitated compatibility with Series X/S hardware features through shared elements, allowing cross-platform development with minimal adjustments. The Direct3D 11 series maintains with Direct3D 10 hardware via feature levels, such as 10_0 and 10_1, which expose subsets of functionality to ensure older GPUs can run 11.x applications by disabling unsupported stages like compute shaders. This approach enabled widespread adoption in games, where Direct3D 11 powered titles like and , leveraging its balanced abstractions for both graphics and GPGPU tasks to deliver performant, developer-friendly rendering without the low-level overhead of later APIs.

Direct3D 12 and Ultimate

Direct3D 12, released in 2015 alongside , introduced a low-level graphics designed to minimize CPU overhead and maximize GPU utilization by providing developers with explicit control over hardware resources. This shift from the higher-abstraction model of Direct3D 11 emphasized direct management of GPU commands, enabling richer scenes with more objects and complex effects. Key innovations include command lists and queues for recording and submitting GPU instructions asynchronously, facilitating multi-threaded command submission across CPU cores to reduce bottlenecks. Developers must handle explicit resource management, such as transitioning resources between states via barriers, and use descriptor heaps to batch resource bindings efficiently, eliminating the need for traditional state objects in favor of direct GPU access. Root signatures further enhance this model by defining shader parameter layouts at a low level, allowing for optimized pipeline state setups tailored to specific rendering passes. Building on this foundation, Direct3D 12 Ultimate, announced in 2020 as Feature Level 12_2, extended the with advanced hardware-accelerated features to support next-generation rendering techniques. It incorporates mesh shaders and amplification shaders for more efficient geometry processing, reducing CPU involvement in triangle rasterization by allowing shaders to generate or cull primitives directly on the GPU. Sampler feedback enables texture streaming optimizations by providing hardware feedback on mip level usage, while variable rate shading (VRS) Tier 2 permits per-draw or per-primitive shading rate control to balance quality and performance. (DXR) Tier 1.1 enhances ray tracing capabilities with support for opacity micromaps, improving acceleration structure efficiency for complex scenes. By November 2025, Direct3D 12 has seen iterative updates, with significant advancements announced at the 2025 (GDC). DirectX Raytracing 1.2 introduces opaque motion maps and other optimizations that address traversal bottlenecks, delivering up to 2.3x performance improvements in ray-traced workloads compared to prior tiers. These enhancements include AI-accelerated denoising through neural rendering APIs, enabling real-time noise reduction in ray-traced outputs for more practical adoption in games. Integration with DirectStorage has also advanced, with version 1.3 providing refined APIs for GPU decompression of assets, further reducing load times in Direct3D 12 applications. Hardware requirements for Direct3D 12 begin at Feature Level 11_0, supported by GPUs from 's GTX 900 series onward, RX 400 series, and 's 6th-generation Core processors or later. Direct3D 12 Ultimate, however, mandates more capable hardware, such as RTX 20 series or equivalent and GPUs with dedicated ray tracing cores for full feature support. Adoption of Direct3D 12 has been widespread in modern titles, powering games like Hitman 2 and , where it delivers performance gains of over 10-40% in multi-GPU and multi-core scenarios through reduced overhead and better scaling. Titles such as leverage these capabilities for enhanced visuals and efficiency, often achieving 50% or more uplift in frame rates on multi-core systems compared to Direct3D 11 equivalents.

Technical Architecture

Programming Interfaces

Direct3D employs Component Object Model (COM)-based interfaces to provide a structured approach for developers to interact with graphics hardware, ensuring compatibility across versions through inheritance and evolution in functionality. These interfaces facilitate device creation, resource management, and command submission, with core abstractions like devices serving as factories for essential objects such as swap chains, render targets, and depth buffers. The API's design emphasizes explicit control, particularly in later versions, to optimize performance on modern GPUs. Initialization in Direct3D begins with adapter using DXGI interfaces, such as IDXGIFactory, to identify available graphics adapters on the system, followed by querying hardware capabilities through feature levels or specific support checks to ensure compatibility before proceeding to device creation. For instance, in Direct3D 12, developers enumerate adapters via IDXGIFactory::EnumAdapters and query features using ID3D12Device::CheckFeatureSupport with s like D3D12_FEATURE to validate support for elements such as ray tracing or variable rate shading. This flow prevents runtime failures by confirming hardware alignment early, a process refined from earlier versions where Direct3D 9 used IDirect3D9::GetAdapterIdentifier for similar but with less granular feature querying. Once validated, a device is created—IDirect3D9::CreateDevice in Direct3D 9, D3D11CreateDevice in Direct3D 11 yielding an ID3D11Device, or D3D12CreateDevice in Direct3D 12 producing an ID3D12Device—acting as the primary for subsequent objects. The ID3D11Device and ID3D12Device both represent virtual adapters and are used to instantiate resources like render targets and depth-stencil views, though Direct3D 12 extends this to include command allocators, queues, and pipeline state objects for low-level control. Unlike Direct3D 9's IDirect3D9, which directly handles device creation and in a unified interface, Direct3D 12 separates responsibilities into IDXGIFactory (or its derived versions like IDXGIFactory7) for adapter and creation, promoting and multi-adapter support. Recent updates as of 2024 include D3D12 Work Graphs, which enable GPU-driven asynchronous work submission via methods like ID3D12GraphicsCommandList::DispatchGraph, allowing shaders to dynamically schedule tasks without CPU intervention for enhanced autonomy in compute and graphics workloads. The IDXGISwapChain interface, introduced with DXGI in Direct3D 10 and carried forward, manages presentation by handling one or more back buffers for rendered data before displaying it to the output, enabling control over vertical synchronization (VSync) via flags in the Present method. This represents an evolution from Direct3D 9's focus on direct backbuffer access through IDirect3DDevice9::GetBackBuffer, shifting toward a more abstracted, flip-model approach in later versions that supports efficient buffer swapping and windowed/fullscreen transitions without manual surface management. Developers create IDXGISwapChain via IDXGIFactory::CreateSwapChain, passing the device as a parameter, and use it to retrieve buffers for rendering via GetBuffer, ensuring seamless integration with the device's resource ecosystem. Command execution differs significantly between versions: Direct3D 11 relies on immediate device contexts (ID3D11DeviceContext) for real-time command submission directly to the GPU, providing a synchronous model where calls like Draw or Clear are executed inline. In contrast, Direct3D 12 uses deferred command lists, such as ID3D12GraphicsCommandList, which developers record commands into (e.g., via RSSetViewports or DrawInstanced) before submitting them to a command queue for asynchronous GPU execution, reducing CPU overhead and enabling better parallelism. This shift allows multiple threads to record into separate lists, which are then executed via ID3D12CommandQueue::ExecuteCommandLists, a capability absent in Direct3D 11's primarily single-threaded immediate context. As of 2024, Work Graphs extend this model by allowing shader-initiated task graphs for dynamic, GPU-autonomous execution, supporting features like thread launching and data coalescing in shader model 6.8. Error handling across Direct3D versions utilizes HRESULT return codes from interface methods to indicate success (S_OK) or specific failures, such as E_INVALIDARG for invalid parameters or DXGI_ERROR_DEVICE_REMOVED for hardware issues, allowing developers to diagnose and recover gracefully. For validation, debug layers—enabled via flags like D3D11_CREATE_DEVICE_DEBUG in device creation or the D3D12 SDK Layers DLL—intercept calls to report warnings, errors, and performance issues in the debug output, aiding in compliance with best practices without affecting release builds. These layers, part of the Windows SDK, provide detailed for issues like resource state mismatches or invalid descriptor usage, essential for robust application development.

Graphics Pipeline Stages

The Direct3D graphics pipeline is a sequence of stages that processes 3D scene data from vertex input to final output, enabling efficient rendering for real-time applications. In early versions such as Direct3D 9 and prior, the pipeline relied heavily on fixed-function hardware for stages like vertex transformation, , and rasterization, limiting flexibility to predefined operations set via calls. This evolved in Direct3D 10 to a fully programmable model, where most stages could be customized using written in HLSL, replacing fixed-function units with developer-controlled logic to support advanced effects like procedural and complex shading. Subsequent versions built on this foundation: Direct3D 11 introduced tessellation stages for dynamic subdivision, while Direct3D 12 added and amplification to further optimize vertex and by allowing variable output topologies and at the shader level. As of 2024, D3D12 Work Graphs integrate with compute to enable GPU-autonomous , allowing dynamic work expansion and synchronization via shader nodes in HLSL shader model 6.8. Data flows linearly through the , starting with raw vertex data and culminating in blended , with optional feedback loops like stream output for intermediate data reuse. The Input Assembler stage initiates the pipeline by reading vertex data from buffers and assembling primitives such as triangles, lines, or points based on the specified topology. It supports indexed or non-indexed drawing and handles instancing for repeated geometry, supplying assembled vertices directly to the vertex shader; this fixed-function stage was introduced in Direct3D 10 to streamline input handling over the more fragmented vertex buffer management in earlier versions. The Vertex Shader processes individual vertices from the input assembler, typically performing transformations like world-view-projection matrix multiplications to position them in screen space. As a required programmable stage since Direct3D 10, it outputs transformed attributes such as position, normals, and texture coordinates, with a pass-through option if no changes are needed; in Direct3D 12, it can be optionally replaced by mesh shaders for more efficient handling of large vertex sets. Introduced in Direct3D 11, the Hull Shader, Tessellator, and Domain Shader form the tessellation unit, enabling adaptive subdivision of low-detail patches into higher-detail geometry for smoother surfaces without increasing base model complexity. The programmable hull shader evaluates patch data to output control points and tessellation factors; the fixed-function tessellator then generates domain points based on those factors; finally, the programmable domain shader computes final vertex positions and attributes for the new primitives, supporting techniques like terrain rendering. The Geometry Shader, added in Direct3D 10, operates on entire input primitives (e.g., a triangle's three vertices) to generate or amplify output primitives, such as emitting multiple triangles from one or discarding primitives via . This optional programmable stage supports applications like fur rendering or particle systems by allowing dynamic changes, though it is computationally intensive and can be bypassed or replaced by Direct3D 12's amplification shaders for better performance in variable-rate scenarios. Following geometry processing, the fixed-function Rasterizer stage converts vector primitives into rasterized fragments by performing clipping against view frustum boundaries, back-facing primitives, and applying perspective division to convert to 2D screen space. It interpolates per-vertex attributes across the primitive to generate fragment data, including depth values, and applies scissor and multisample settings before passing to the pixel shader; this stage evolved from Direct3D 9's simpler rasterization by integrating more configurable options like conservative rasterization in later versions. The Pixel Shader (also known as fragment shader) is a programmable stage that computes color and other attributes for each rasterized fragment, incorporating texturing, lighting calculations, and effects like shadows or procedural noise. Introduced as programmable in Direct3D 8 and refined in Direct3D 10, it processes interpolated inputs to output up to eight render targets per fragment, with options for early-Z depth testing to optimize execution; it remains a core stage across versions for per-pixel realism. The pipeline concludes with the Output Merger stage, which resolves fragment outputs by performing depth and stencil testing, then blending pixel shader results with existing render target values using configurable operations like alpha blending or additive accumulation. This fixed-function stage, unified in Direct3D 10 from separate blend and depth units in prior versions, determines final pixel visibility and supports multiple render targets for techniques such as .

Resource and Memory Management

In Direct3D, resources represent the fundamental data structures used by the graphics pipeline, including buffers and textures that store vertex data, indices, constants, and image information. Buffers are unstructured collections of typed data elements, commonly used for vertex buffers to hold position and attribute data, index buffers for triangle connectivity, and constant buffers for shader parameters. Textures, on the other hand, are multidimensional arrays supporting 1D, 2D, 3D, or cube map formats, enabling storage of color, normal, or environmental data for sampling in shaders. Surfaces, as a legacy concept from earlier versions, refer to 2D texture slices or render targets but are largely superseded by more flexible texture resources in modern APIs. Resources are created through device-specific methods, such as ID3D11Device::CreateBuffer or CreateTexture2D in Direct3D 11, which derive from the ID3D11Resource interface, and ID3D12Device::CreateCommittedResource in Direct3D 12, yielding an ID3D12Resource. These creation calls specify dimensions, format, and usage flags like D3D11_USAGE_DEFAULT for GPU-only access optimized for rendering, D3D11_USAGE_DYNAMIC for CPU-writeable resources requiring /Unmap operations, or D3D11_USAGE_STAGING for CPU-GPU data transfers without direct shader access. In Direct3D 12, equivalent heap types and resource states manage similar behaviors, with flags indicating read/write patterns to ensure proper synchronization. To access resources in the pipeline, views provide typed interfaces for binding: Shader Resource Views (SRVs) allow read-only sampling from textures or buffers in pixel and vertex shaders; Render Target Views (RTVs) enable write operations to textures as output from the rasterizer; and Unordered Access Views (UAVs), introduced in Direct3D 11, support random read/write access in compute shaders or pixel shader outputs for techniques like particle simulation. Views are created via methods like ID3D11Device::CreateShaderResourceView, specifying subresource ranges to avoid unnecessary data exposure, and must match the resource's format and bind flags for compatibility. In Direct3D 12, descriptors for these views are allocated from descriptor heaps, enhancing batching efficiency. Memory management evolved significantly across versions to balance developer control and performance. In Direct3D 9, the managed pool (D3DPOOL_MANAGED) automatically handled residency in video , evicting and restoring as needed to prevent overflows, though this introduced CPU overhead from implicit copies. Starting with Direct3D 10, explicit subresource management replaced pools, requiring developers to specify bind flags (e.g., D3D10_BIND_VERTEX_BUFFER) and handle CPU/GPU copies manually via UpdateSubresource, reducing runtime overhead but increasing complexity. Direct3D 12 further refines this with committed heaps, created alongside resources for simple allocation, and placed heaps, where multiple resources share a pre-allocated heap for denser packing; descriptor heaps separately manage view metadata, with types like D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV for shader-visible bindings. Residency mechanisms track GPU memory usage to handle limited VRAM, particularly in Direct3D 11 and later. Developers set eviction priorities via ID3D11Resource::SetEvictionPriority, guiding the runtime to discard low-priority resources (e.g., distant textures) during memory pressure, with automatic restoration on next use. In Direct3D 12, explicit residency APIs like ID3D12Pageable::SetResidency allow querying current budget via ID3D12Device::GetBudget and making resources resident/evicted, enabling advanced streaming in open-world applications without runtime intervention. Eviction handling involves checking return codes from commands and re-uploading data, often using staging resources as intermediaries. Optimizations focus on bandwidth and storage efficiency, such as block compression formats (BC) for textures, where BC1-BC3 provide 4:1 compression for RGB data using 4x4 blocks, and BC6H/BC7 extend to HDR and advanced color fidelity in Direct3D 11, reducing by up to 75% without quality loss in most cases. Mipmapping generates hierarchical texture levels automatically; in Direct3D 9, D3DX utilities like D3DXCreateTextureFromFileEx enable this during load, while Direct3D 11 supports runtime generation via ID3D11DeviceContext::GenerateMips for SRVs, filtering levels based on the base texture to improve rendering performance by minimizing . A common pitfall in is improper lifetime handling, leading to memory leaks if references (e.g., to ID3D11Resource or views) are not released via Release calls, as Direct3D uses without garbage collection. Developers must track creation and destruction, especially in dynamic scenarios like level loading, to avoid accumulating unreleased GPU allocations that degrade performance over time.

Core Features

Feature Levels

Feature levels in Direct3D provide a standardized way to expose tiers of hardware capabilities, allowing applications to target a range of graphics hardware while ensuring compatibility. The concept was first introduced in Direct3D 10.1 to provide between 10.0 and 10.1 hardware, where the 10_0 level requires Model 4.0 support. This mechanism was expanded in Direct3D 11 to include lower tiers from Direct3D 9, enabling developers to write code once and deploy across diverse GPUs with automatic fallback to supported functionality. In Direct3D 11, feature levels range from 9_1 to 11_0, each defining a specific set of supported features. The 9_1 level provides basic support with Shader Model 2.0 (vertex and pixel shaders 2_x), limited texture dimensions up to 2048x2048, and no advanced primitives like geometry shaders. Levels 9_2 and 9_3 build on this with minor enhancements; 9_2 offers similar capabilities to 9_1 but adds support for one simultaneous render target, while 9_3 adds hardware instancing and increases maximum texture dimensions to 4096x4096. The 10_0 level introduces Shader Model 4.0, geometry shaders, and larger texture support up to 8192x8192, with 10_1 extending it to include cubemap arrays and additional shader instructions. At the top, 11_0 supports Shader Model 5.0, via hull and domain shaders, compute shaders, up to 16384x16384 textures, and 8 unordered access view (UAV) slots per shader stage. Direct3D 12 feature levels begin at 11_0 as the baseline and extend to 12_2, focusing on advanced rendering techniques with progressive enhancements. The 11_0 level mirrors Direct3D 11's capabilities but under the D3D12 runtime supports Models 6.0 and 5.1, with optional tiled resources. Level 11_1 adds optional conservative rasterization and improved tiled resources. The 12_0 level mandates Tier 2 tiled resources, optional conservative rasterization, and Model 6.0. Level 12_1 requires Tier 1 conservative rasterization, with optional raytracing and variable rate shading (VRS). Finally, 12_2 introduces Tier 1 shaders, Tier 1.1 raytracing, Tier 2 VRS, Tier 3 conservative rasterization, and Model 6.5, building on all prior levels as a superset. To determine supported feature levels, applications use D3D11CreateDevice (for Direct3D 11 and below) or D3D12CreateDevice (for Direct3D 12), passing an array of desired D3D_FEATURE_LEVEL values in descending order; the runtime returns the highest compatible level, enabling fallback to lower tiers if needed. Additional checks via ID3D12Device::CheckFeatureSupport can query optional features within a level. This system benefits developers by allowing a single codebase to run on varied hardware, such as a Direct3D 11 application executing on Direct3D 9-era GPUs at reduced fidelity without crashes or major rewrites. However, limitations include no support for levels below 9_1 in Direct3D 11 and higher versions, and Direct3D 12 requiring at least 11_0, excluding older hardware entirely.

Multithreading Support

In early versions of Direct3D, such as Direct3D 9 and earlier, the API operated under a single-threaded model by default, where the device interface combined resource creation and rendering operations and was not inherently thread-safe. To enable multithreading, developers could specify the D3DCREATE_MULTITHREADED flag during device creation, but this introduced significant synchronization overhead from the runtime, leading to performance degradation and CPU bottlenecks, particularly during frequent state changes and draw calls that serialized execution on multi-core processors. Direct3D 10 introduced limited multithreading support through a thread-safe layer, but the device still required single-threaded access for most operations, combining creation and rendering in a way that restricted parallelism. With Direct3D 11, the separated creation (handled by the thread-safe ID3D11Device) from rendering commands (managed by ID3D11DeviceContext), enabling deferred contexts (ID3D11DeviceContext instances created via ID3D11Device::CreateDeferredContext) to record commands in parallel across multiple threads while maintaining a single submission thread on the immediate context for execution. This design allowed distribution of CPU overhead for command preparation but serialized GPU execution to avoid races, with synchronization needed only for shared resources using mechanisms like critical sections. Starting with Direct3D 11.1, multithreading extended to , , and object creation, allowing concurrent calls to ID3D11Device methods without additional , though rendering execution remained serialized on the GPU side. Direct3D 12 advanced explicit multithreading by introducing command queues (of types DIRECT for general graphics, COPY for data transfers, and COMPUTE for compute workloads) that accept submissions from multiple threads, with command lists recorded independently per thread and executed asynchronously via ID3D12CommandQueue::ExecuteCommandLists. across threads and queues relies on fences (ID3D12Fence), signaled through ID3D12CommandQueue::Signal to track completion and prevent overlaps, giving developers fine-grained control over parallelism while shifting more responsibility to the application for managing CPU-GPU interactions. Best practices for Direct3D 12 multithreading emphasize using thread-local command allocators to avoid contention during list recording, implementing thread-safe allocation patterns for resources to prevent cross-thread access violations, and relying on resource barriers and fences to synchronize state changes without direct thread locking. Developers should ensure no concurrent modifications to shared objects, partitioning workloads across threads to minimize points. These multithreading enhancements in Direct3D 12 yield significant performance gains on multi-core CPUs, particularly in command preparation and resource setup, enabling more efficient utilization of available cores compared to the serialized models of prior versions. For profiling thread contention and parallelism in Direct3D applications, the Performance Investigator for DirectX (PIX) tool captures CPU timelines, command list executions, and events to identify bottlenecks in multi-threaded workloads.

Shader and Compute Capabilities

Direct3D's shader capabilities have evolved significantly across versions, enabling increasingly sophisticated programmable graphics and compute workloads. Model 1.0 (SM1.0), introduced with Direct3D 8.0, supported only assembly-language programming for fixed-function-like vertex and shaders, limiting developers to low-level instructions without high-level abstractions. With Model 2.0 (SM2.0) in Direct3D 9.0, basic static branching and looping were added, allowing conditional execution in and vertex shaders while maintaining compatibility with earlier hardware through software fallbacks. Model 3.0 (SM3.0) further advanced dynamic flow control, including true dynamic branching and loops, which improved performance for complex effects like procedural textures by reducing unnecessary computations. Shader Model 4.0 (SM4.0), debuting in Direct3D 10.0, unified the architecture across vertex, , and newly introduced shaders, enabling and stream output for more efficient processing. This model also supported higher instruction counts and texture sampling capabilities, fostering advanced rendering techniques such as . Shader Model 5.0 (SM5.0) in Direct3D 11 introduced shaders for adaptive surface subdivision and shaders for general-purpose GPU , expanding Direct3D beyond traditional pipelines. Subsequent iterations under Shader Model 6.0 and later, tied to Direct3D 12, incorporated wave intrinsics for subwarp operations—allowing efficient SIMD-like execution across thread groups—and support for raytracing extensions, enhancing parallelism in modern GPUs. As of 2025, shader models have advanced to 6.9, adding features like 64-bit atomics (6.6), enhanced intrinsics (6.7–6.8), and cooperative vectors for accelerated matrix and neural rendering computations (6.9). The High-Level Shading Language (HLSL) serves as Direct3D's primary programming interface, offering a C-like syntax for defining shaders with built-in types for vectors (e.g., float3), matrices, and texture samplers. HLSL code is compiled into using tools like the legacy FXC compiler or the modern DXC ( Shader Compiler), which targets specific profiles such as vs_5_0 for vertex shaders under SM5.0 or ps_6_0 for shaders under SM6.0, ensuring hardware compatibility through feature levels. These profiles dictate the shader stage and model version, with DXC providing improved optimization and support for newer features like SPIR-V export for cross-API portability. Compute shaders, available from Direct3D 11 onward via SM5.0, enable GPGPU tasks outside the by dispatching thread groups—typically configured with [numthreads(x, y, z)] attributes, such as 64 threads per group for balanced workload distribution. Developers invoke them using ID3D11DeviceContext::Dispatch or its Direct3D 12 equivalent, processing data in parallel with access to UAVs (unordered access views) for read-write buffers. Thread groups share fast groupshared (up to 32 KB on modern hardware) for intra-group communication and synchronization via barriers, facilitating algorithms like particle simulations or matrix multiplications without full global contention. Direct3D 12's raytracing support, introduced through the (DXR) API in Shader Model 6.4, integrates ray generation, closest-hit, any-hit, and miss shaders into a unified . As of March 2025, DXR 1.2 adds opacity micromaps for improved performance (up to 10x speedup on supported hardware) and enhanced tooling. Acceleration structures—built as bottom-level (BLAS) for instances and top-level (TLAS) for scene hierarchies—optimize ray-triangle intersection tests, reducing traversal costs for realistic lighting and reflections. Ray generation shaders serve as the entry point, emitting primary or secondary rays and invoking TraceRayInline for traversal, with payload data passed between shader stages to accumulate results like shading attributes. The compilation in Direct3D involves source-to- transformation, where HLSL is processed offline or at runtime into device-specific consumable by the GPU. For , reflection data—accessed via ID3D11ShaderReflection or D3D12 equivalents—exposes metadata such as constant buffers, resource bindings, and variable types from the , aiding runtime state setup without reparsing . This separation allows caching for faster load times while enabling tools to validate inputs like root signatures in Direct3D 12.

Extensions and Variants

Direct3D Mobile

Direct3D Mobile, often abbreviated as D3DM, was introduced as a subset of Direct3D 9 to provide 3D graphics support for resource-constrained mobile and embedded devices running Windows Mobile and Windows CE operating systems. This API emphasized a fixed-function pipeline to minimize computational overhead and power consumption, making it suitable for early mobile hardware with limited GPU capabilities. Unlike the full desktop Direct3D implementation, D3DM omitted advanced programmable shader features and focused on basic rendering operations to ensure compatibility with low-end processors prevalent in devices from the mid-2000s. With the release of in 2010, shifted to a emulated on Direct3D 9 hardware, supporting shader model 3.0 for more efficient mobile graphics rendering. This version integrated Direct3D capabilities into the XNA Framework, enabling developers to create games and applications with hardware-accelerated 3D effects while maintaining with Direct3D 9-level hardware. The evolution continued with Direct3D 11 support in in 2012, where ARM-based devices supported feature levels up to 9_3 (with a minimum of 9_1) to accommodate mobile SoC constraints. This configuration allowed (UWP) applications on to leverage Direct3D for cross-device compatibility, though with restrictions on advanced features. Key differences from desktop Direct3D included optimizations for power efficiency, such as reduced overhead and exclusion of desktop-specific extensions like or advanced compute shaders. Mobile implementations also incorporated techniques, introduced in Direct3D 11.2, to manage low memory footprints by streaming only necessary texture tiles, thereby conserving bandwidth on embedded GPUs. Direct3D Mobile features were phased out following the end-of-life for Windows 10 Mobile in 2019, as Microsoft discontinued support for phone-specific development. However, remnants persist in embedded scenarios like HoloLens, which utilizes Direct3D 11 and 12 for mixed reality rendering. These adaptations found use in augmented reality (AR) and virtual reality (VR) applications on mobile devices, as well as simple 3D user interfaces for productivity and gaming on Windows Phone and IoT platforms.

Alternative Implementations

Alternative implementations of Direct3D primarily consist of software-based renderers and translation layers developed by third parties or for testing, cross-platform compatibility, and non-Windows environments. These approaches enable Direct3D applications to run without dedicated or on operating systems outside Microsoft's ecosystem, though they often introduce translation overhead and may not fully replicate all native features. Microsoft provides software rasterizers as reference implementations for development and testing. The Reference Rasterizer (REF), available for Direct3D 9, is a pure software device that performs all rendering on the CPU without hardware involvement, allowing developers to verify application behavior independently of GPU-specific issues. For Direct3D 10 and 11, the Windows Advanced Rasterization Platform (WARP) serves a similar role as a high-performance, conformant software renderer integrated into the runtime, supporting up to Direct3D 11.1 features for validation on systems lacking compatible hardware. These tools are essential for debugging but are not intended for production use due to their CPU-bound performance limitations. Cross-platform translation layers extend Direct3D compatibility to non-Windows systems by mapping API calls to underlying graphics APIs like or . In the Wine project, WineD3D translates Direct3D 9 through 11 calls to , enabling Windows games and applications to run on and other systems; this includes experimental support for Direct3D 10 and 11 via 4.x. For improved efficiency on , the 3D framework in Mesa provides native state trackers such as Gallium Nine for Direct3D 9 and experimental Direct3D 10/11 implementations, bypassing some of Wine's translation overhead by directly interfacing with open-source GPU drivers. On macOS, Apple's Game Toolkit incorporates D3DMetal, a translation layer that converts Direct3D 11 and 12 workloads to Metal, facilitating the of Windows games; this is complemented by community efforts like DXMT, an open-source Metal-based layer for Direct3D 10 and 11. For Direct3D 12 specifically on Apple platforms, combinations like VKD3D-Proton (Direct3D 12 to ) with MoltenVK ( to Metal) enable indirect support, though this chain adds latency. Emulation-focused wrappers have become prominent for Linux gaming, particularly through Valve's Steam Proton. DXVK implements 8 through 11 by translating to , delivering near-native performance for many titles by leveraging modern GPU drivers; it is a core component of Proton for running games on . VKD3D-Proton extends this to 12, providing a Vulkan-based layer that supports advanced features like ray tracing via extensions, and is optimized for Proton to handle Windows games seamlessly on and desktop . These reverse-engineered projects, such as the open-source library—which can translate (used in ) to Direct3D backends and vice versa—further enable Direct3D-like functionality in web and cross-platform contexts, though primarily aids rendering on non-native hardware. Despite advancements, these implementations face inherent limitations. Translation layers typically incur performance overhead, often 10-30% lower frame rates compared to native on Windows due to mapping and state synchronization costs, though optimizations in recent releases like VKD3D-Proton 2.14 have reduced CPU overhead and VRAM usage on GPUs. Feature support remains incomplete in earlier versions; for instance, full (DXR) was not available in initial DXVK or VKD3D releases, requiring ray tracing extensions that were added progressively starting around 2020. By 2025, support has improved significantly on ARM architectures, with native 12 drivers for X series enabling efficient rendering on Windows on ARM devices, and layers like VKD3D-Proton enhancing compatibility for Android emulation via tools like Winlator.

Development Tools

D3DX Utility Library

The D3DX utility library provides a collection of helper functions and classes designed to simplify common tasks in Direct3D application development, such as mathematical computations, resource loading, and geometry manipulation. Originally introduced with Direct3D 9, it is delivered as a (DLL) that extends the core Direct3D with pre-built routines for graphics-related operations. While integral to earlier versions like Direct3D 9 and 10, D3DX has been deprecated starting with and is unsupported in Windows Store apps, reflecting Microsoft's shift toward modular, open-source alternatives to reduce dependency bloat in the SDK. At its core, D3DX includes robust mathematical utilities with no external dependencies beyond the Direct3D runtime, featuring structures like D3DXMATRIX for 4x4 matrices, D3DXVECTOR3 for 3D vectors, and D3DXQUATERNION for representations. These enable efficient operations such as matrix transformations (e.g., D3DXMatrixRotationX for axis ), vector arithmetic, and manipulations (e.g., D3DXQuaternionRotationYawPitchRoll to build from ). Additionally, it supports computations, including D3DXComputeBoundingSphere for generating oriented bounding spheres around vertex sets and frustum intersection tests like D3DXComputeBoundingFrustum, which aid in and . For resource handling and rendering, D3DX offers functions like D3DXCreateTextureFromFile, which loads image files (e.g., BMP, DDS) directly into Direct3D textures for quick prototyping without manual format conversion. It also includes sprite and font rendering via the ID3DXSprite interface for 2D overlay drawing (e.g., batched quad rendering with alpha blending) and ID3DXFont for text output, supporting formatted ANSI/ strings with methods like DrawText for efficient on-screen UI elements. processing is facilitated by tools such as D3DXSimplifyMesh, which applies edge-collapse algorithms to reduce counts while preserving visual using user-defined vertex and attribute weights. In practice, D3DX streamlines development by generating debug geometry, such as with D3DXCreateSphere, which creates a tessellated for immediate-mode rendering or visualization aids. However, its monolithic and platform-specific ties to Windows led to around 2012, as integrated essential components into the Windows SDK and encouraged lighter, redistributable options. For Direct3D 11 and later, math operations have migrated to the standalone DirectXMath library, using SIMD-optimized types like XMMATRIX and XMVECTOR for equivalent vector/matrix/quaternion handling with improved performance and no DLL overhead. Specialized utilities, such as texture loading and optimization, are now handled by open-source libraries like DirectXTex and DirectXMesh, released by in 2015 to support legacy code migration without proprietary dependencies.

Effects Framework and DXUT

The Effects Framework in Direct3D, primarily through the D3DXEffect interface in Direct3D 9, provides a high-level for managing and rendering states, allowing developers to define techniques and passes that encapsulate configurations, global variables, textures, samplers, and code in a single .fx file. Techniques represent multiple rendering options tailored to hardware capabilities, each containing one or more passes that implement specific rendering styles, such as vertex and combinations. Parameters serve as non-static variables for dynamic adjustments, like properties or transformation matrices, while annotations offer metadata for these parameters to facilitate authoring and validation. State blocks within the framework capture and restore states, including , textures, and render states, between Begin and End calls to ensure efficient rendering without manual state management. To use the framework, developers load an effect file via D3DXCreateEffect or D3DXCreateEffectFromFile, then select an active technique with ID3DXEffect::SetTechnique, followed by Begin to apply the technique's passes, CommitChanges to update device states, and rendering within each pass using BeginPass and EndPass. For Direct3D 11, effect loading is supported through functions like D3DX11CreateEffectFromFile in the Effects 11 library, which compiles and loads HLSL effect files into runtime objects for management. This abstraction simplifies complex effects like post-processing, as seen in 's legacy Direct3D 9 samples where .fx files implement bloom by blurring bright scene regions and them onto the original image for a glowing effect. Annotations enable semantic descriptions, such as [string] for technique selection or [float] for parameter ranges, aiding tools like FX Composer for editing. However, the D3DX Effects system was deprecated starting with the SDK, removed from core Direct3D 10 and later APIs in favor of direct HLSL management and explicit state setting, though -maintained Effects 11 (FX_11), which was archived as read-only on November 12, 2025, persists for Direct3D 11 compatibility. DXUT, the DirectX Utility Toolkit, serves as a sample framework for scaffolding Direct3D applications on Win32 desktop, handling boilerplate tasks like creation, device enumeration, and event processing to focus development on graphics logic. Key components include DXUTCreateDevice, which initializes a Direct3D device based on user settings for fullscreen or windowed modes, and DXUTMainLoop, which implements the application's message pump to process Windows events, render frames, and handle device changes or losses. It also provides built-in input handling for keyboard and via callbacks like OnKeyboard and OnMouse, along with a high-resolution timer for measuring frame rates and delta times. Optional integration with D3DX enables simple GUI elements, such as sliders for parameter tweaking in samples. In Microsoft's archived DirectX SDK samples, DXUT powers legacy demos for Direct3D 9 through 11, streamlining setup for effects-based rendering like the aforementioned bloom post-processing. As of November 2025, DXUT remains available on (archived as read-only on November 12, 2025) for educational purposes and maintaining older codebases but is no longer recommended for new projects, having been superseded by templates, raw Win32 or UWP windowing, and libraries like DirectXTK for utilities. Modern Direct3D 12 applications often integrate immediate-mode GUIs such as Dear ImGui for input and overlays, paired with explicit device creation via D3D12CreateDevice, to achieve similar without legacy dependencies.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.