1. Beginning Direct3D Game Programming:
1. The History of Direct3D
Graphics
jintaeks@gmail.com
Division of Digital Contents, DongSeo University.
April 2016
2. Long time ago…
Before Windows, DOS was the most popular operating system
for the PC.
In this chapter, you will learn about:
– The history and earlier versions of DirectX, leading up to the current
version.
– The introduction of point sprites and vertex and pixel shaders in
DirectX 8.
– The basics of 3D textures.
2
3. Raster graphics
In computer graphics, a raster graphics image is a dot
matrix data structure representing a generally rectangular grid
of pixels, or points of color, viewable via a monitor, paper, or
other display medium. Raster images are stored in image
files with varying formats.
3
4. Triangle
A basic primitive for a mesh.
Uniquely define a plane with minimal points.
An internal point can be represented relatively easy way.
– Barycentric Coordinate
A polygon must be converted to the collection of triangles.
4
8. DirectX 6/7
Until the advent of DirectX 8.0, Direct3D consisted of two
distinct APIs: Retained Mode and Immediate Mode.
Retained Mode was built on top of Immediate Mode and
provided additional services, such as frame hierarchy and
animation.
Development of the Retained Mode API has been frozen with
the release of DirectX 6.0.
The major changes between Direct3D Immediate Mode
versions 6.0 and 7.0 affected the support of hardware-
accelerated transformation and lighting.
8
10. DirectX 8
Point sprites (hardware-supported sprite objects)
3D volumetric textures (textures with three dimensions)
An improved Direct3DX library (which provided many useful
and highly optimized routines)
Vertex and pixel shaders (which interface to program the
graphics processor directly)
N-patches (which add an algorithm and vertices to a model
to get a higher tessellated model)
10
11. Point Sprites
Support for point sprites in Direct3D 9 enables the high-
performance rendering of points (particle systems).
Point sprites are generalizations of generic points that enable
arbitrary shapes to be rendered as defined by textures.
11
17. N-patches
Function
In mathematics, a function[1] is a relation between a set of
inputs and a set of permissible outputs with the property that
each input is related to exactly one output.
An example is the function that relates each real number x to
its square x2.
This function commonly denoted by
f(x) = x2
or
y = x2
17
18. Implicit function
In mathematics, an implicit equation is a relation of the
form R(x1,..., xn) = 0, where R is a function of several variables.
For example, the implicit equation of the unit circle is x2+y2-
1=0
18
19. The unit circle can be defined implicitly as the set of
points (x,y)satisfying x2+y2=1. Around point A, y can be
expressed as a function y(x), specifically g1(x)= 1 − 𝑥2. No
such function exists around point B, where the tangent
space is vertical.
19
20. Parametric function
In parametric function, the outputs will be determined by a
function of the parameter(for example 'u'), and the value of
the parameter changes within a certain range.
x=f(u), y=g(u) , where 0 <= u <= 1
Above equation can be denoted in this way:
(f(u),g(u)) , where 0 <= u <= 1
A parametric function is a general way for representing a
curved line.
20
21. B-spline with control points/control polygon, and marked
component curves
21
23. To more higher dimension
A parametric surface is a surface in the Euclidean
space R3 which is defined by a parametric equation with two
parameters
Parametric representation is a very general way to specify a
surface.
23
24. In computer aided design, computer aided manufacturing,
and computer graphics, a powerful extension of B-splines is
non-uniform rational B-splines (NURBS).
NURBS are essentially B-splines in homogeneous coordinates.
24
26. DirectX 9
The overall API has not changed much from DirectX 8.1 to
DirectX 9.0.
The new version introduced new and very much improved
vertex shader and pixel shader standards, including the
vs_2_0, vs_2_x, and vs_3_0 vertex shader standards and the
ps_2_0, s_2_x, and ps_3_0 pixel shader standards.
To be able to write shaders in the most efficient way, an HLSL
(High-Level Shader Language) was introduced in DirectX 9.
A scissor test and line anti-aliasing were introduced.
The support of Multiple render targets.
The support of up to 24-bit color precision.
The DirectX 9.0 SDK provides a programming framework.
26
30. Anti-aliasing
Above left: an aliased version of a simple
shape; above right: an anti-aliased version of
the same shape;
right: The anti-aliased graphic at 5x
magnification.
30
31. Multiple Render Targets
Multiple Render Targets (MRT) refers
to the ability to render to multiple
surfaces (see IDirect3D9Surface) with
a single draw call.
31
32. DirectX 10
Incorporates Microsoft's high-level shader language 4.0.
The Direct3D 10 API introduces unified vertex
shader and pixel shader.
DirectInput and DirectPlay have been deprecated and some of
their components removed.
32
39. Shader Model 4.0
Common Shader Core
Full integer/bitwise instruction set
– Massively parallel image and data processing
– Custom decompression schemes
Buffer Load – CPU-like unfiltered memory access
Switch statements and subroutines
No limits
– More interstage registers, samplers, textures
– Unlimited instruction count
40. DirectX 11
GPGPU support (DirectCompute).
Improved multi-threading support to assist video game
developers in developing games that better utilize multi-
core processors.
Hardware tessellation and Shader Model 5.0 require
Direct3D 11 supporting hardware.
– Tessellation is implemented on the GPU to calculate a smoother
curved surface from a coarse (less detailed) input patch.
40