Direct3D
Encyclopedia
Direct3D is part of Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

's DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

 application programming interface
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 (API). Direct3D is available for Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s (Windows 95
Windows 95
Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...

 and above), and for other platforms through the open source software Wine
Wine (software)
Wine is a free software application that aims to allow computer programs written for Microsoft Windows to run on Unix-like operating systems. Wine also provides a software library, known as Winelib, against which developers can compile Windows applications to help port them to Unix-like...

. It is the base for the graphics API on the Xbox
Xbox
The Xbox is a sixth-generation video game console manufactured by Microsoft. It was released on November 15, 2001 in North America, February 22, 2002 in Japan, and March 14, 2002 in Australia and Europe and is the predecessor to the Xbox 360. It was Microsoft's first foray into the gaming console...

 and Xbox 360
Xbox 360
The Xbox 360 is the second video game console produced by Microsoft and the successor to the Xbox. The Xbox 360 competes with Sony's PlayStation 3 and Nintendo's Wii as part of the seventh generation of video game consoles...

 console systems. Direct3D is used to render three dimensional graphics
3D computer graphics
3D computer graphics are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images...

 in applications where performance is important, such as games. Direct3D also allows applications to run fullscreen instead of embedded in a window, though they can still run in a window if programmed for that feature. Direct3D uses hardware acceleration
Hardware acceleration
In computing, Hardware acceleration is the use of computer hardware to perform some function faster than is possible in software running on the general-purpose CPU...

 if it is 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
Z-buffering
In computer graphics, z-buffering is the management of image depth coordinates in three-dimensional graphics, usually done in hardware, sometimes in software. It is one solution to the visibility problem, which is the problem of deciding which elements of a rendered scene are visible, and which...

, anti-aliasing
Anti-aliasing
In digital signal processing, spatial anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing when representing a high-resolution image at a lower resolution...

, alpha blending
Alpha compositing
In computer graphics, alpha compositing is the process of combining an image with a background to create the appearance of partial or full transparency. It is often useful to render image elements in separate passes, and then combine the resulting multiple 2D images into a single, final image in a...

, mipmap
Mipmap
In 3D computer graphics texture filtering, MIP maps are pre-calculated, optimized collections of images that accompany a main texture, intended to increase rendering speed and reduce aliasing artifacts. They are widely used in 3D computer games, flight simulators and other 3D imaging systems. The...

ping, atmospheric effects, and perspective-correct texture mapping
Texture mapping
Texture mapping is a method for adding detail, surface texture , or color to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D. thesis of 1974.-Texture mapping:...

. Integration with other DirectX technologies enables Direct3D to deliver such features as video mapping, hardware 3D rendering in 2D overlay planes, and even sprites
Sprite (computer graphics)
In computer graphics, a sprite is a two-dimensional image or animation that is integrated into a larger scene...

, providing the use of 2D and 3D graphics in interactive media titles.

Direct3D is a 3D
3D computer graphics
3D computer graphics are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images...

 API. That is, it contains many commands for 3D rendering; however, since version 8, Direct3D has superseded the old DirectDraw
DirectDraw
DirectDraw is part of Microsoft's DirectX API. DirectDraw is used to render graphics in applications where top performance is important. DirectDraw also allows applications to run fullscreen or embedded in a window such as most other MS Windows applications. DirectDraw uses hardware acceleration if...

 framework and also taken responsibility for the rendering of 2D graphics
2D computer graphics
2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models and by techniques specific to them...

. 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
Video card
A video card, Graphics Card, or Graphics adapter is an expansion card which generates output images to a display. Most video cards offer various functions such as accelerated rendering of 3D scenes and 2D graphics, MPEG-2/MPEG-4 decoding, TV output, or the ability to connect multiple monitors...

 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
Windows Advanced Rasterization Platform
The Windows Advanced Rasterization Platform is a software rasterizer device that is a component of Windows Graphics runtime in Windows 7 and Windows Server 2008 R2, as well as Windows Vista and Windows Server 2008 ....

, designed to emulate complete feature set of Direct3D 10.1, is included with Windows 7; its performance is said to be on par with lower-end 3D cards on multi-core CPUs.

Direct3D's main competitor is OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...

. There are many features and issues that proponents of either API disagree over, see Comparison of OpenGL and Direct3D for a summary.

History

In 1992, Servan Keondjian started a company named RenderMorphics, which developed a 3D graphics API named Reality Lab
Reality Lab
Reality Lab was a 3D computer graphics API created by RenderMorphics to provide a standardized interface for writing games. It was one of the main contenders in the realtime 3D middleware marketplace at the time, alongside Criterion Software's RenderWare and Argonaut Software's BRender.Reality Lab...

, which was used in medical imaging and CAD software. Two versions of this API were released. Microsoft bought RenderMorphics in February 1995, bringing Keondjian on board to implement a 3D graphics engine for Windows 95
Windows 95
Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...

. This resulted in the first version of Direct3D that shipped in DirectX 2.0 and DirectX 3.0.

Direct3D initially implemented "retained mode" and "immediate mode" 3D APIs. The retained mode was a COM
Component Object Model
Component Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...

-based scene graph
Scene graph
A scene graph is a general data structure commonly used by vector-based graphics editing applications and modern computer games. Examples of such programs include Acrobat 3D, Adobe Illustrator, AutoCAD, CorelDRAW, OpenSceneGraph, OpenSG, VRML97, and X3D....

 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 one game that sold a significant volume, Lego Island
Lego Island
LEGO Island is a Lego based action-adventure computer game developed by Lego and Mindscape. Released for the PC on October 2, 1997, the game is the first in the Lego Island series , followed by Lego Island 2 The Brickster's Revenge, Island Xtreme Stunts, and Lego Island Xtreme Stunts Lego sets.-...

, was based on the Direct3D retained mode, so Microsoft did not update the retained mode after DirectX 3.0.

The first version of Direct3D immediate mode was based on 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 in order to perform the 3D rendering. They were extremely awkward to program, however, hindering adoption of the new API and stimulating calls for Microsoft to adopt OpenGL as the official 3D rendering API for games as well as workstation applications. (see OpenGL vs. Direct3D
Comparison of Direct3D and OpenGL
Direct3D and OpenGL are competing application programming interfaces which can be used in applications to render 2D and 3D computer graphics, taking advantage of hardware acceleration when available...

)

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 proprietary APIs such as 3dfx
3dfx
3dfx Interactive was a company that specialized in the manufacturing of 3D graphics processing units and, later, graphics cards. It was a pioneer in the field for several years in the late 1990s until 2000 when it underwent one of the most high-profile demises in the history of the PC industry...

's Glide
Glide API
Glide is a 3D graphics API developed by 3dfx Interactive for their Voodoo Graphics 3D accelerator cards. Although it originally started as a proprietary API, it was later open sourced by 3dfx. It was dedicated to gaming performance, supporting geometry and texture mapping primarily, in data...

. A team in Redmond took over development of the Direct3D Immediate mode, while Servan's RenderMorphics team continued work on the Retained mode.

Direct3D 5 to 9

Direct3D 5.0 introduced the DrawPrimitive API that eliminated the need for applications to construct execute buffers.

Direct3D 6.0 introduced numerous features to cover contemporary hardware (such as multitexture
Texture mapping
Texture mapping is a method for adding detail, surface texture , or color to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D. thesis of 1974.-Texture mapping:...

 and stencil buffer
Stencil buffer
A stencil buffer is an extra buffer, in addition to the color buffer and depth buffer found on modern computer graphics hardware. The buffer is per pixel, and works on integer values, usually with a depth of one byte per pixel...

s) as well as optimized geometry pipelines for x87
X87
x87 is a floating point-related subset of the x86 architecture instruction set. It originated as an extension of the 8086 instruction set in the form of optional floating point coprocessors that worked in tandem with corresponding x86 CPUs. These microchips had names ending in "87"...

, SSE
Streaming SIMD Extensions
In computing, Streaming SIMD Extensions is a SIMD instruction set extension to the x86 architecture, designed by Intel and introduced in 1999 in their Pentium III series processors as a reply to AMD's 3DNow! . SSE contains 70 new instructions, most of which work on single precision floating point...

 and 3DNow!
3DNow!
3DNow! is an extension to the x86 instruction set developed by Advanced Micro Devices . It adds single instruction multiple data instructions to the base x86 instruction set, enabling it to perform simple vector processing, which improves the performance of many graphic-intensive applications...

 and optional texture management to simplify programming. 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
Bump mapping
Bump mapping is a technique in computer graphics for simulating bumps and wrinkles on the surface of an object. This is achieved by perturbing the surface normals of the object and using the perturbed normal during lighting calculations. The result is an apparently bumpy surface rather than a...

 technique. Microsoft included these features in DirectX, then added them to the requirements needed for drivers to get a Windows logo
WHQL Testing
Windows Hardware Quality Labs testing or WHQL Testing is Microsoft's testing process which involves running a series of tests on third-party hardware or software, and then submitting the log files from these tests to Microsoft for review...

 to encourage broad adoption of the features in other vendors' hardware.

Direct3D 7.0 introduced the .dds
DirectDraw Surface
The DirectDraw Surface file format , from Microsoft, is a standard for storing data compressed with the lossy S3 Texture Compression algorithm, which can be decompressed in hardware by GPUs and consoles like the Playstation Portable, PlayStation 3 and Xbox 360...

 texture format and support for transform and lighting hardware acceleration
Hardware acceleration
In computing, Hardware acceleration is the use of computer hardware to perform some function faster than is possible in software running on the general-purpose CPU...

 (first available on PC hardware with NVIDIA's GeForce
GeForce 256
The GeForce 256 is the original release in Nvidia's "GeForce" product-line. Released on August 31, 1999, the GeForce 256 improves on its predecessor by increasing the number of fixed pixel pipelines, offloading host geometry calculations to a hardware transform and lighting engine, and adding...

), 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 8.0 introduced programmability in the form of vertex and pixel shader
Shader
In the field of computer graphics, a shader is a computer program that is used primarily to calculate rendering effects on graphics hardware with a high degree of flexibility...

s, enabling developers to write code without worrying about superfluous hardware state. The complexity of the shader programs depended on the complexity of the task, and the display driver
Device driver
In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....

 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
DirectDraw
DirectDraw is part of Microsoft's DirectX API. DirectDraw is used to render graphics in applications where top performance is important. DirectDraw also allows applications to run fullscreen or embedded in a window such as most other MS Windows applications. DirectDraw uses hardware acceleration if...

 as a separate API. 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
Distance fog
Distance fog is a technique used in 3D computer graphics to enhance the perception of distance by simulating fog.Because many of the shapes in graphical environments are relatively simple, and complex shadows are difficult to render, many graphics engines employ a "fog" gradient so objects further...

, bump mapping
Bump mapping
Bump mapping is a technique in computer graphics for simulating bumps and wrinkles on the surface of an object. This is achieved by perturbing the surface normals of the object and using the perturbed normal during lighting calculations. The result is an apparently bumpy surface rather than a...

 and texture mapping
Texture mapping
Texture mapping is a method for adding detail, surface texture , or color to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D. thesis of 1974.-Texture mapping:...

.

Direct3D 9.0 added a new version of the High Level Shader Language
High Level Shader Language
The High Level Shader Language or High Level Shading Language is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API. It is analogous to the GLSL shading language used with the OpenGL standard...

, support for floating-point texture formats, Multiple Render Targets
Multiple Render Targets
In the field of 3D computer graphics, Multiple Render Targets, or MRT, is a feature of modern graphics processing units that allows the programmable rendering pipeline to render images to multiple render target textures at once. These textures can then be used as inputs to other shaders or as...

, and texture lookups in the vertex shader. An extension only available in Windows Vista, called Direct3D 9Ex (previously versioned 9.0L), allows the use of the advantages offered by Windows Vista's Windows Display Driver Model
Windows Display Driver Model
Windows Display Driver Model is the graphic driver architecture for video card drivers running Microsoft Windows versions beginning with Windows Vista....

 (WDDM) and is used for Windows Aero
Windows Aero
Windows Aero is the graphical user interface and the default theme in most editions of Windows Vista and Windows 7, operating systems released by Microsoft. It is also available in Windows Server 2008, but is not enabled by default. Its name is a backronym for Authentic, Energetic, Reflective and...

. Direct3D 9Ex, in conjunction with DirectX 9 class WDDM drivers allows graphics memory to be virtualized and paged out
Paging
In computer operating systems, paging is one of the memory-management schemes by which a computer can store and retrieve data from secondary storage for use in main memory. In the paging memory-management scheme, the operating system retrieves data from secondary storage in same-size blocks called...

 to system memory, allows graphics operations to be interrupted and scheduled and allow DirectX surfaces to be shared across processes. Direct3D 9.0Ex was previously known as version 1.0 of Windows Graphics Foundation (WGF).

Direct3D 10

Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

 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 features an updated shader model 4.0 and optional interruptibility for shader programs.. In this model shaders still consist of fixed stages as on previous versions, but all stages sport 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 actually be generated from within a shader, allowing for complex geometry to be generated entirely on the graphics hardware.

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
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

 and because of the massive installed 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
Company of Heroes
Company of Heroes is a real-time strategy computer game developed by Relic Entertainment. It was released on September 12, 2006, and was the first title to make use of the Games for Windows label. A standalone expansion, Opposing Fronts, was released on September 25, 2007. A second standalone...

, or games originally developed for Direct3D 9 with a Direct3D 10 path retrofitted later in development, such as Hellgate: London
Hellgate: London
Hellgate: London is a dark fantasy themed action role-playing game originally developed by Flagship Studios, released on October 31, 2007. It was developed by a team headed by former Blizzard Entertainment employees, some of whom had overseen the creation of the Diablo series...

 or Crysis
Crysis
Crysis is a science fiction first-person shooter video game developed by Crytek , published by Electronic Arts for Microsoft Windows, and released in November 2007. It is the first game of a trilogy. A separate game entitled Crysis Warhead was released on September 12, 2008, and follows similar...

.

The DirectX 10 SDK became available in February 2007.

New features:
  • Fixed pipelines 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.
  • Shader model 4.0 enhances the programmability of the graphics pipeline
    Graphics pipeline
    In 3D computer graphics, the terms graphics pipeline or rendering pipeline most commonly refers to the current state of the art method of rasterization-based rendering as supported by commodity graphics hardware. The graphics pipeline typically accepts some representation of a three-dimensional...

    . It adds instructions for integer and bitwise calculations.
  • Geometry shaders, which work on adjacent triangles which form a mesh
    Polygon mesh
    A polygon mesh or unstructured grid is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling...

    .
  • Texture
    Texture mapping
    Texture mapping is a method for adding detail, surface texture , or color to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D. thesis of 1974.-Texture mapping:...

     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
    Hidden surface determination
    In 3D computer graphics, hidden surface determination is the process used to determine which surfaces and parts of surfaces are not visible from a certain viewpoint...

    , which prevents objects from being rendered if it is not visible or too far to be visible.
  • Instancing 2.0
    Geometry instancing
    In real-time computer graphics, geometry instancing is the practice of rendering multiple copies of the same mesh in a scene at once. This technique is primarily used for objects such as trees, grass, or buildings which can be represented as repeated geometry without appearing unduly repetitive,...

     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.

Direct3D 10.1

Direct3D 10.1 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
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

 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. Features include finer control over antialiasing (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:
  • Mandatory 32-bit floating point
    Floating point
    In computing, floating point describes a method of representing real numbers in a way that can support a wide range of values. Numbers are, in general, represented approximately to a fixed number of significant digits and scaled using an exponent. The base for the scaling is normally 2, 10 or 16...

     filtering.
  • Mandatory support for 4x anti-aliasing
    Anti-aliasing
    In digital signal processing, spatial anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing when representing a high-resolution image at a lower resolution...

  • Shader model
    High Level Shader Language
    The High Level Shader Language or High Level Shading Language is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API. It is analogous to the GLSL shading language used with the OpenGL standard...

     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", but new features will be supported exclusively by new hardware.

The only available Direct3D 10.1 hardware as of June 2008 were the Radeon HD 3000 series
Radeon R600
The graphics processing unit codenamed the Radeon R600 is the foundation of the Radeon HD 2000/3000 series and the FireGL 2007 series video cards developed by ATI Technologies...

 and Radeon HD 4000 series
Radeon R700
The Radeon R700 is the engineering codename for a graphics processing unit series developed by Advanced Micro Devices under the ATI brand name. The foundation chip, codenamed RV770, was announced and demonstrated on June 16, 2008 as part of the FireStream 9250 and Cinema 2.0 initiative launch media...

 from ATI
Ati
As a word, Ati may refer to:* Ati, a town in Chad* Ati, a Negrito ethnic group in the Philippines* Ati-Atihan Festival, an annual celebration held in the Philippines* Ati, a queen of the fabled Land of Punt in Africa...

; in 2009, they were joined by Chrome 430/440GT GPUs from S3 Graphics
S3 Graphics
S3 Graphics, Ltd is an American company specializing in graphics chipsets. Although they do not have the large market share that they once had, they still produce graphics accelerators for home computers under the "S3 Chrome" brand name.-History:...

 and select lower-end models in GeForce 200 series
GeForce 200 Series
The GeForce 200 Series is the 10th generation of Nvidia's GeForce graphics processing units. The series also represents the continuation of the company's unified shader architecture introduced with the GeForce 8 Series and the GeForce 9 Series. Its primary competition came from ATI's Radeon HD 4000...

 from Nvidia
NVIDIA
Nvidia is an American global technology company based in Santa Clara, California. Nvidia is best known for its graphics processors . Nvidia and chief rival AMD Graphics Techonologies have dominated the high performance GPU market, pushing other manufacturers to smaller, niche roles...

. In 2011, Intel chipsets started supporting Direct3D 10.1 with the introduction of HD graphics 2000 (GMA HD)
Intel GMA
The Intel Graphics Media Accelerator, or GMA, is a series of Intel integrated graphics processors built into various motherboard chipsets....

.

Direct3D 11

Direct3D 11 was released as part of Windows 7. It was presented at Gamefest 2008 on July 22, 2008 and demonstrated at the Nvision
Nvision
Nvision, stylized as NVISION, is a stand alone event organized by NVIDIA to promote visual computing amongst enthusiasts and journalists....

 08 technical conference on August 26, 2008. AMD previewed working DirectX11 hardware at Computex on June 3, 2009, running some DirectX 11 SDK samples. Its features include:
  • Tessellation
    Tessellation
    A tessellation or tiling of the plane is a pattern of plane figures that fills the plane with no overlaps and no gaps. One may also speak of tessellations of parts of the plane or of other surfaces. Generalizations to higher dimensions are also possible. Tessellations frequently appeared in the art...

    — to increase at runtime the number of visible polygons from a low detail polygonal model
  • Multithreaded
    Thread (computer science)
    In computer science, a thread of execution is the smallest unit of processing that can be scheduled by an operating system. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process...

     rendering
    — to render to the same Direct3D device object from different threads for multi core CPUs
  • Compute shaders
    GPGPU
    General-purpose computing on graphics processing units is the technique of using a GPU, which typically handles computation only for computer graphics, to perform computation in applications traditionally handled by the CPU...

    — which exposes the shader pipeline for non-graphical tasks such as stream processing
    Stream processing
    Stream processing is a computer programming paradigm, related to SIMD , that allows some applications to more easily exploit a limited form of parallel processing...

     and physics acceleration, similar in spirit to what OpenCL
    OpenCL
    OpenCL is a framework for writing programs that execute across heterogeneous platforms consisting of CPUs, GPUs, and other processors. OpenCL includes a language for writing kernels , plus APIs that are used to define and then control the platforms...

    , Nvidia CUDA
    CUDA
    CUDA or Compute Unified Device Architecture is a parallel computing architecture developed by Nvidia. CUDA is the computing engine in Nvidia graphics processing units that is accessible to software developers through variants of industry standard programming languages...

    , ATI Stream achieves, and HLSL
    High Level Shader Language
    The High Level Shader Language or High Level Shading Language is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API. It is analogous to the GLSL shading language used with the OpenGL standard...

     Shader
    Shader
    In the field of computer graphics, a shader is a computer program that is used primarily to calculate rendering effects on graphics hardware with a high degree of flexibility...

     Model 5 among others.


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.

The Direct3D 11 runtime is able to run on Direct3D 9 and 10.x-class hardware and drivers, expanding the functionality first introduced in Direct3D 10.1 runtime. Feature levels 9_1, 9_2 and 9_3 encapsulate various features of popular Direct3D 9 cards, and feature levels 10_0 and 10_1 refer to Direct3D 10 and 10.1 respectively; each upper level is a strict superset of a lower level. 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.
Tessellation
Tessellation
A tessellation or tiling of the plane is a pattern of plane figures that fills the plane with no overlaps and no gaps. One may also speak of tessellations of parts of the plane or of other surfaces. Generalizations to higher dimensions are also possible. Tessellations frequently appeared in the art...

 was earlier considered for Direct3D 10, but was later abandoned. GPUs such as Radeon R600
Radeon R600
The graphics processing unit codenamed the Radeon R600 is the foundation of the Radeon HD 2000/3000 series and the FireGL 2007 series video cards developed by ATI Technologies...

 feature a tessellation engine that can be used with Direct3D 9/10/10.1 and OpenGL, 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
Order independent transparency
Order-independent transparency or OIT in computer graphics denotes any technique that can correctly render overlapping semi-transparent objects without having to sort them before they are being rendered....

, which was never exposed by the Direct3D API but supported almost transparently by early Direct3D hardware such as Videologic's PowerVR
PowerVR
PowerVR is a division of Imagination Technologies that develops hardware and software for 2D and 3D rendering, and for video encoding, decoding, associated image processing and Direct X, OpenGL ES, OpenVG, and OpenCL acceleration....

 line of chips.

The Direct3D 11 Technical Preview has been included in November 2008 release of DirectX SDK.

First seen in the Release Candidate version, Windows 7 integrates the first released Direct3D 11 support. Windows Vista Platform Update includes full-featured Direct3D 11 runtime and DXGI 1.1 update, as well as other related components from Windows 7 like WARP
Windows Advanced Rasterization Platform
The Windows Advanced Rasterization Platform is a software rasterizer device that is a component of Windows Graphics runtime in Windows 7 and Windows Server 2008 R2, as well as Windows Vista and Windows Server 2008 ....

, Direct2D
Direct2D
Direct2D is a 2D and vector graphics application programming interface designed by Microsoft and implemented in Windows 7 and Windows Server 2008 R2, and also Windows Vista and Windows Server 2008 and Platform Update Supplement for Windows Vista and for Windows Server 2008 & KB2505189 update...

, DirectWrite
DirectWrite
DirectWrite is a text-layout and glyph-rendering API by Microsoft. It was designed to replace GDI/GDI+ and Uniscribe for screen-oriented rendering and was shipped with Windows 7 and Windows Server 2008 R2, as well as Windows Vista and Windows Server 2008 DirectWrite is a text-layout and...

, and WIC
Windows Imaging Component
The Windows Imaging Component is a Component Object Model based imaging codec framework introduced in Windows Vista and Windows XP Service Pack 3 for working with and processing digital images and image metadata...

.

Direct3D 11.1

Direct3D 11.1 is an update to the API that will initially ship with Windows 8
Windows 8
Windows 8 is the codename for the next version of the Microsoft Windows computer operating system following Windows 7. It has many changes from previous versions. In particular it adds support for ARM microprocessors in addition to the previously supported x86 microprocessors from Intel and AMD...

. The Direct3D runtime in Windows 8 features DXGI 1.2 and requires new WDDM 1.2
Windows Display Driver Model
Windows Display Driver Model is the graphic driver architecture for video card drivers running Microsoft Windows versions beginning with Windows Vista....

 device drivers.

Preliminary version of the Windows SDK for Windows 8 Developer Preview was released on September 13, 2011. The new API features shader tracing
Tracing (software)
In software engineering, tracing is a specialized use of logging to record information about a program's execution. This information is typically used by programmers for debugging purposes, and additionally, depending on the type and detail of information contained in a trace log, by experienced...

, support for video playback, shader processing of video resources, and on-the-fly swapping between Direct3D 10 and 11 contexts and feature levels. Direct3D 11.1 also features 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
Intel HD Graphics
Intel HD Graphics is a series of Intel integrated graphics processors built into computer processors.-History:Previous to HD Graphics, Intel integrated graphics were built into the motherboard's northbridge. This included Intel Extreme Graphics and the Intel Graphics Media Accelerator...

.

Architecture

Direct3D is a Microsoft DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

 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
Graphics Device Interface
The Graphics Device Interface is a Microsoft Windows application programming interface and core operating system component responsible for representing graphical objects and transmitting them to output devices such as monitors and printers....

 (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
Z-buffering
In computer graphics, z-buffering is the management of image depth coordinates in three-dimensional graphics, usually done in hardware, sometimes in software. It is one solution to the visibility problem, which is the problem of deciding which elements of a rendered scene are visible, and which...

and so on). It also had a higher level Retained mode component, that has now been 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
Monochrome
Monochrome describes paintings, drawings, design, or photographs in one color or shades of one color. A monochromatic object or image has colors in shades of limited colors or hues. Images using only shades of grey are called grayscale or black-and-white...

 device provides white and black rendering, while the RGB
RGB color model
The RGB color model is an additive color model in which red, green, and blue light is added together in various ways to reproduce a broad array of colors...

 device renders in color. There are four types of devices:
  • HAL (hardware abstraction layer) device: For devices supporting hardware acceleration.

  • Reference device: Simulates new functions not yet available in hardware. It is necessary to install the Direct3D SDK
    Software development kit
    A software development kit is typically a set of software development tools that allows for the creation of applications for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar platform.It may be something as simple...

     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.


Every device contains at least one swap chain. A swap chain is made up of one or more back buffer
Buffer (computer science)
In computer science, a buffer is a region of a physical memory storage used to temporarily hold data while it is being moved from one place to another. Typically, the data is stored in a buffer as it is retrieved from an input device or just before it is sent to an output device...

 surfaces. Rendering occurs in the back buffer
Double buffering
In computer science, multiple buffering is the use of more than one buffer to hold a block of data, so that a "reader" will see a complete version of the data, rather than a partially-updated version of the data being created by a "writer"...

.

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
    Memory pool
    Memory pools, also called fixed-size-blocks allocation, allow dynamic memory allocation comparable to malloc or C++'s operator new. As those implementations suffer from fragmentation because of variable block sizes, it can be impossible to use them in a real time system due to performance...

    : 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 colour depth (8 bits for red, 8 bits for green and 8 bits for blue).
  • Usage: Describes, with a collection of flag
    Flag (computing)
    In computer programming, flag can refer to one or more bits that are used to store a binary value or code that has an assigned meaning, but can refer to uses of other data types...

     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.

Pipeline

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 10 pipeline are:
  1. Input Assembler: Reads in vertex data from an application supplied vertex buffer and feeds them down the pipeline.
  2. Vertex Shader: Performs operations on a single vertex at a time, such as transformations, skinning, or lighting.
  3. Hull Shader: Performs operations on sets of patch control points, and generates additional data known as patch constants.
  4. Tesselation stage: Subdivides geometry to create higher-order representations of the hull.
  5. Domain Shader: Performs operations on vertices output by the tessellation stage, in much the same way as a vertex shader.
  6. Geometry Shader: 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: Can write out the previous stage's results to memory. This is useful to recirculate data back into the pipeline.
  8. Rasterizer: 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: Determines the final pixel colour to be written to the render target and can also calculate a depth value to be written to the depth buffer.
  10. Output Merger: 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.

Display modes

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'.
  • Windowed mode: The result is shown inside the area of a window. Direct3D communicates with GDI
    Graphics Device Interface
    The Graphics Device Interface is a Microsoft Windows application programming interface and core operating system component responsible for representing graphical objects and transmitting them to output devices such as monitors and printers....

     to generate the graphical output in the display. Windowed mode can have the same level of performance as full-screen, depending on driver support.

Direct3D Mobile

Direct3D Mobile is derived from Direct3D but has a smaller memory footprint
Memory footprint
Memory footprint refers to the amount of main memory that a program uses or references while running.This includes all sorts of active memory regions like code, static data sections , heap, as well as all the stacks, plus memory required to hold any additional data structures, such as symbol...

. Windows CE
Windows CE
Microsoft Windows CE is an operating system developed by Microsoft for embedded systems. Windows CE is a distinct operating system and kernel, rather than a trimmed-down version of desktop Windows...

 provides Direct3D Mobile support.

D3DX

Direct3D comes with D3DX
D3dx
In computing, D3DX is a high level API library which is written to supplement Microsoft's Direct3D graphics API. The D3DX library was introduced in Direct3D 7, and subsequently was improved in Direct3D 9...

, a library of tools designed to perform common mathematical calculations on vectors, matrices
Matrix (mathematics)
In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions. The individual items in a matrix are called its elements or entries. An example of a matrix with six elements isMatrices of the same size can be added or subtracted element by element...

 and colors, calculating look-at and projection
Projection (mathematics)
Generally speaking, in mathematics, a projection is a mapping of a set which is idempotent, which means that a projection is equal to its composition with itself. A projection may also refer to a mapping which has a left inverse. Bot notions are strongly related, as follows...

 matrices, spline interpolation
Spline interpolation
In the mathematical field of numerical analysis, spline interpolation is a form of interpolation where the interpolant is a special type of piecewise polynomial called a spline. Spline interpolation is preferred over polynomial interpolation because the interpolation error can be made small even...

s, and several more complicated tasks, such as compiling or assembling shaders used for 3D graphic programming, compressed skeletal animation
Skeletal animation
Skeletal animation is a technique in computer animation in which a character is represented in two parts: a surface representation used to draw the character and a hierarchical set of interconnected bones used to animate the mesh...

 storage and matrix stacks. There are several functions that provide complex operations over 3D mesh
Mesh
Mesh consists of semi-permeable barrier made of connected strands of metal, fiber, or other flexible/ductile material. Mesh is similar to web or net in that it has many attached or woven strands.-Types of mesh:...

es like tangent-space computation, mesh simplification, precomputed radiance transfer
Precomputed Radiance Transfer
Precomputed Radiance Transfer is a computer graphics technique used to render a scene in real time with complex light interactions being precomputed to save time...

, 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
Sprite (computer graphics)
In computer graphics, a sprite is a two-dimensional image or animation that is integrated into a larger scene...

 based particle system
Particle system
The term particle system refers to a computer graphics technique to simulate certain fuzzy phenomena, which are otherwise very hard to reproduce with conventional rendering techniques...

s. Spatial functions include various intersection routines, conversion from/to barycentric coordinates
Barycentric coordinates (mathematics)
In geometry, the barycentric coordinate system is a coordinate system in which the location of a point is specified as the center of mass, or barycenter, of masses placed at the vertices of a simplex . Barycentric coordinates are a form of homogeneous coordinates...

 and bounding box/sphere generators. D3DX
D3dx
In computing, D3DX is a high level API library which is written to supplement Microsoft's Direct3D graphics API. The D3DX library was introduced in Direct3D 7, and subsequently was improved in Direct3D 9...

 is provided as a dynamic link library (DLL).

Some features present in previous versions of D3DX were removed in Direct3D 11, such as:
  • A large part of the math library has been removed. Microsoft recommends use of the XNA
    Microsoft XNA
    Microsoft XNA is a set of tools with a managed runtime environment provided by Microsoft that facilitates video game development and management. XNA attempts to free game developers from writing "repetitive boilerplate code" and to bring different aspects of game production into a single system...

     Math library instead.
  • The Effect framework has been removed and is now distributed as source.
  • The Mesh interface has been removed.

DXUT

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. It is only usable for writing simple technology-oriented demos, tutorials and workshops.

Wine

The Wine
Wine (software)
Wine is a free software application that aims to allow computer programs written for Microsoft Windows to run on Unix-like operating systems. Wine also provides a software library, known as Winelib, against which developers can compile Windows applications to help port them to Unix-like...

 project has working implementations of the Direct3D 8, 9 and 10 APIs (they are, as of 16 April 2011, 100%, 78% and 44% complete respectively). Wine's implementation can also be on Windows under certain conditions. Work on implementing Direct3D 10 began in Wine 1.1.7, using OpenGL via WGL.

Direct3D and Windows Vista

Windows Vista and its updated driver model brings some new improvements and changes compared to the Windows XP model, and is expected to evolve even more as the hardware and the OS evolve (via future service packs or in the next version of Windows).

Windows Vista forces multithreading, via a theoretically unlimited number of execution contexts on the GPU. Multithreading was already supported in Windows XP as two applications or more could execute in different windows and be hardware accelerated. Windows Vista makes it a requirement to support an arbitrarily large number of execution contexts (or threads) in hardware or in software. Vista, in its basic scheduling incarnation (the current driver model), manages threads all by itself, allowing the hardware to switch from one thread to the other when appropriate. This is a departure from Windows XP, where the hardware could decide to switch threads on its own, as the OS had limited control about what the GPU could do. Also Windows Vista handles memory management and paging (to system memory and to disk), which is a necessity in order to support a large number of execution contexts with their own resources. Each execution context is presented with a resource view of the GPU that matches the maximum available (or exceeds it for aware applications). Most of the management is implemented on the OS side in order to be properly integrated into the OS-kernel memory management.

Execution contexts are protected from each other. Because of the user-mode implementation of the Vista driver, a rogue or badly written app can take control of the execution of the 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 user-mode implementation can reduce the occurrence of BSODs caused by graphics drivers (which is a much more catastrophic event to a running app than a device-lost event).

Regularly Microsoft spokespeople talked about the necessity to have a finer grain context switching (referred to as "advanced scheduling") so as to be able to switch two execution threads at the shader-instruction level instead of the single-command level or even batch of commands, as in yet-unpublished WDDM 2.x specification. This is not a requirement of Vista, nor of Direct3D 10 compatibility. Direct3D10 apps can run, and are now running, on top of the basic scheduling implementation. This is not typically a problem except for a potential application that would have very long execution of a single command/batch of commands (which is currently prevented under Windows Vista). Vista cannot enforce right now a finer-grained context switching, as it will require additional support from hardware vendors, but it may appear in the future.

Finer-grain preemptive multitasking was introduced in WDDM/DXGI 1.2 which shipped with Windows 8 Developer Preview.

See also

  • HLSL
    High Level Shader Language
    The High Level Shader Language or High Level Shading Language is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API. It is analogous to the GLSL shading language used with the OpenGL standard...

     – High Level Shader Language
  • DirectX
    DirectX
    Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

     – Collection of API's in which Direct3D is implemented
  • OpenGL
    OpenGL
    OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...

     – Main competitor to Direct3D
  • DirectDraw
    DirectDraw
    DirectDraw is part of Microsoft's DirectX API. DirectDraw is used to render graphics in applications where top performance is important. DirectDraw also allows applications to run fullscreen or embedded in a window such as most other MS Windows applications. DirectDraw uses hardware acceleration if...

  • 3D computer graphics
    3D computer graphics
    3D computer graphics are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images...

  • Shader
    Shader
    In the field of computer graphics, a shader is a computer program that is used primarily to calculate rendering effects on graphics hardware with a high degree of flexibility...

  • Silverlight

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK