The Direct3D Pipeline explained.

The Direct3D pipeline explained

Introduction.
In this image taken from the SDK Docs we see that there are alot to deal with here. The pipeline is the flow your data takes from when it's declared until it gets rendered to your display. We are going to step through each of the elements represented in the pipeline.

Vertex Data.
a Vertex : the basic unit of producing 3D graphics. a Basic vertex can contain spatial coordinates (x, y, z), a vector normal, a color value and texture coordinates.
Spatial coordinates : The location of points in space.
Data: Raw information, unprocessed information

This vertex data is normally stored in a special buffer which is called the Vertex Buffer. The vertex buffers can contain transformed/untransformed vertex data. You can even specify where in memory the vertex buffer is stored using the memory pool and usage classes.
The Vertex Buffer also has a description in terms of it's capabilities.

Primitive Data.
an Index : In this context it's an integer offset in the vertex buffer.

an Index buffer is a memory buffer that stores index data. Index data are integer offsets in the vertex data. It also has the description in terms of it's capabilities.

Tesselation.
The description from the SDK Docs. "The tesselator unit converts higher-order primitives, displacement maps, and mesh patches to vertex locations and stores those locations in vertex buffers.", tesselation unit is explicitly for splitting complex surfaces up into triangles.

Vertex processing.
3D transformations are applied to the vertex data stored in the vertex buffers. This is where you have the choice of using a vertex shader or the fixed function pipeline(FFP).

Geometry processing.
From the SDK Docs. "Clipping, back face culling, attribute evaluation, and rasterization are applied to the transformed vertices.".

Textured surface.
a Texture :is an image in memory.
From the SDK Docs. "Texture coordinates for 3-D surfaces are supplied to Direct3D through the IDirect3DTexture9 interface."

Texture sampler.
This is the stage in the pipeline that you get to choose the level of detail you want your texture to be rendered with.

Pixel processing.
Using the geometry data to modify the input vertex and texture data. This resulting in pixel color values. You could also choose to replace the fixed function pipeline of the pixel processing with pixel shaders.

Pixel rendering.
From the SDK Docs. "Final rendering processes modify pixel color values with alpha, depth, or stencil testing, or by applying alpha blending or fog. All resulting pixel values are presented to the output display.", This is where the final processing takes place. Setting the color of each pixel and rendered to the display.

Conclusion
It is an added advantage to know how your data gets processed in the pipeline. This will help you better understand shaders and the FFP(Fixed function pipeline). Anyone really interested in Direct3D or even graphics development in general should really make an effort to understand how your data is moved through the pipeline. I hope this helps some people understand it just a little bit better that don't have the DX SDK Docs installed.

Published Wednesday, May 25, 2005 10:21 AM by pieterg
Filed under:

Comments

# re: The Direct3D Pipeline explained.

IwIVyW Hi from Russia!

Sunday, March 16, 2008 11:15 PM by zxevil163

# re: The Direct3D Pipeline explained.

YRAgfn  <a href="tgvfswcdaswh.com/.../a>, [url=http://xsmnrxnrnlcx.com/]xsmnrxnrnlcx[/url], [link=http://rsfvdfbczrsl.com/]rsfvdfbczrsl[/link], http://svffhbhehzrp.com/

Tuesday, April 15, 2008 1:45 AM by dcbmzovk

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: