Graphics Reference
In-Depth Information
When applying M w 2 n to all of the vertices, we get
V at =(
0
6
0
525
) ,
.
,
.
V bt =
0
2
0
525
) ,
.
,
.
LargeSquare ndc =
(10.4)
V ct =
0
2
0
475
) ,
.
, −
.
V dt =(
0
5
0
475
) ,
.
,
.
and
ndc. Abbreviation for normal-
ized device coordinate . We
will study the details of this
coordinate
V at =(
0
6
0
525
) ,
.
,
.
V et =(
1
1
0
525
) ,
.
,
.
SmallSquare ndc =
(10.5)
system in Sec-
V ft =(
1
1
1
15
) ,
.
,
.
tion 10.2.
V gt =(
0
6
1
15
) .
.
,
.
Here we see that Direct3D actually transforms the input vertices into much smaller
numbers. It is interesting that we defined the vertices of the squares accord-
ing to LargeSquare wc (Equation (10.1)) and SmallSquare wc (Equation (10.2)),
only to define the transform operator M n 2 w (Equation (10.3)) to ensure that the
D3D API transforms these input vertices to LargeSquare ndc (Equation (10.4)) and
SmallSquare ndc (Equation (10.5)). Based on these observations, it is logical to
conclude the following.
The effects of M n 2 w . If we define the input vertices by LargeSquare ndc
and SmallSquare ndc , then there would be no need for the M w 2 n operator of
Equation (10.3).
Tutorial 10.2.
Project Name
D3D _ ViewTransform1
Tutorial 10.2. Drawing without the w2n Transform
Goal. Verify the effects of the w2n matrix.
Approach. Draw the two squares defined by the vertices of LargeSquare ndc
and SmallSquare ndc with identity in the D3D VIEW matrix processor.
Figure 10.3 is a screenshot of running Tutorial 10.2. We observe the output to
be identical to that of Tutorial 10.1. However, the drawing routines of these two
tutorials are different in significant ways. From Listing 10.2, we observe the
following differences.
Figure 10.3.
Tutorial
10.2.
Step 2. We do not compute the w2n matrix. Instead, we initialize all three
matrix processors to identity and proceed to drawing the squares.
 
Search WWH ::




Custom Search