Volume 2: Rendering
Eighth Printing and Earlier
- Page 172. In the third line after Equation (8.55), “is output” should be “are output”.
- Page 178. In Listing 8.8, the first texture fetch should have
depth as separate parameters to be consistent with the rest of the section.
Seventh Printing and Earlier
- Page 119. In Listing 7.5, The expression assigned to
nz should be
1.0F / sqrt(dx * dx + dy * dy + 1.0F).
Sixth Printing and Earlier
- Page 364. In Listing 10.17, each
colorTexture should be
- Page 367. In Listing 10.18, each
velocityTexture should be
- Page 373. In the last sentence of the second paragraph, replace “is determined” with “are each determined”.
- Page 378. In the middle of the third paragraph, replace “is the x, y, and z directions” with “in the x, y, and z directions”.
- Page 380. In Listing 10.20, parameters of type
int should have type
- Page 386. In Listing 10.22, for the
ReuseEdgeVertex() function, the parameter
const CellStorage *const (& deckStorage)
CellStorage *const (& deckStorage).
- Page 388. In Listing 10.23, parameters of type
int should have type
- Page 388. In Listing 10.23, the third line from the bottom of the page should read
uint16 vcode = vertexCode[a];.
- Page 390. In Listing 10.23, near the end of the listing, each
meshTriangle[a].index should be replaced with
- Page 391. In Listing 10.24, in the three
for statements, the loop conditions
i < n,
j < m, and
k < h should be
i < n - 1,
j < m - 1, and
k < h - 1.
Fifth Printing and Earlier
- Page 78. The second sentence on the page should begin with “This is due to the fact”.
- Page 119. In Listing 7.5, the line on which
nz is defined should read as follows:
float nz = 1.0F / sqrt(dx * dx + dy * dy + 1.0F);
- Page 211. In the caption for Figure 8.21, it should say that the point light is near the upper-left corner of the image, not the upper-right corner.
- Page 277. The last sentence of the first paragraph should end with “on the other side of the portal to receive any light”.
- Page 282. The second sentence of the third paragraph should begin with “However, we do not need to create”.
- Page 307. The last line on the page should begin with “placed using calculations similar to”.
- Page 310. The line preceding Equation (10.20) should end with “all we have to do is calculate”.
- Page 313. The eighth line in the paragraph following Figure 10.9 should begin with “Since the change in z coordinate tends to be very small”.
- Page 320. In the paragraph containing Equation (10.31), the word “the” should be removed near the beginning of the fourth line.
- Page 341. The last sentence on the page should begin with “For a view frustum having projection distance”.
- Page 343. In the paragraph following Equation (10.65), the word “the” should be removed at the beginning of the fourth line.
- Page 353. In Listing 10.13, to be consistent with the HLSL convention used in Listing 8.9, the two lines that sample from the shadow map cascades should both read as follows:
atm += texture(shadowTexture, sampleCoord.xyz, sampleCoord.w) * weight;
- Page 355. The third sentence in Section 10.7 should begin with “This causes a phenomenon”.
- Page 357. In the 11th line from the end of the page, the sentence beginning with “The demonstrates how” should read “This demonstrates how”.
- Page 365. In the caption to Figure 10.64, the sentence describing part (c) should begin with “Rejecting samples based on large differences in depth can cause surfaces”.
Fourth Printing and Earlier
- Page 114. In Listing 7.4, the identifier
position should be
vertexArray, the identifier
texcoord should be
and the identifier
triangle should be
- Page 119. In Listing 7.5, the identifiers
size.y should be
- Page 126. The beginning of the second line after Equation (7.52) should read
“product. First, it includes the height scale”.
- Page 132. In Listing 7.10, on the 7th line from the end, the code should be dividing by the angle count instead of multiplying.
The whole line should read as follows:
ambientMap[x] = pow(sum * (1.0F / float(kAngleCount)), ambientPower);
- Page 144. In the second line following Equation (8.6), it should read “values from being generated”.
- Page 170. In the first line of Section 8.3.1, “present” should be “presents”.
- Page 178. The fifth line from the bottom of the page should begin with “this turns out”.
- Page 178. The last sentence on the page should begin with “Even if such”.
- Page 183. In the first line after Equation (8.70), remove the word “from”.
- Page 249. In Listing 9.10, the last return statement has an extra opening parenthesis.
It should read as follows:
return (Vector3D(0.0F, v.z, −v.y));
- Page 250. In Listing 9.11, the
u on the third line of page 250 should be a
The whole line should read as follows:
float d = Dot(t, vertex[i]);
- Page 261. In the fifth line of the last paragraph, remove the word “the”.
- Page 266. The third line before Equation (9.19) should begin with “that they are”.
- Page 267. In Listing 9.18, near the top of the listing,
polyhedron->planeCount should be
cameraPolyhedron should be
Third Printing and Earlier
- Page 8. The end of the fourth line should read “but it also occurs”.
Second Printing and Earlier
- Page 77. In Listing 6.5, the last row of the matrix should be
0.0F, 0.0F, 0.0F, 1.0F.
- Page 182. In Equation (8.66), both minus signs should be plus signs.
- Page 184. Related to previous item. In Equation (8.73), both minus signs should be plus signs.
- Page 286. There is a bug in the last part of Listing 9.20. The final loop should be the following:
for (int32 i = 0; i < vertexCount; i++)
bool cull = false; int32 j = i & 1;
const Vector3D *v2 = &vertex[i];
Vector3D planeNormal = Normalize(Cross(*v2, *v1));
for (int32 k = 0; k < 4; k++)
const Vector3D& frustumNormal = frustumPlane[k].GetNormal();
float d = Dot(frustumNormal, *v2);
vertexDistance[j ^ 1][k] = d;
// Cull edge lying in frustum plane, but only if its extrusion points inward.
if ((fmax(d, vertexDistance[j][k]) < kOccluderEpsilon) &&
(Dot(planeNormal, frustumNormal) > 0.0F)) cull = true;
if (!cull) occluderPlane[planeCount++] = Plane(planeNormal, 0.0F) * McamInverse;
v1 = v2;