Metaprogramming GPUs with Sh Errata
From ShWiki
(Difference between revisions)
| Revision as of 20:35, 14 September 2005 Francois (Talk | contribs) Add the new definition of atan2 ← Previous diff |
Revision as of 21:06, 14 September 2005 Francois (Talk | contribs) Add a note about bezier Next diff → |
||
| Line 31: | Line 31: | ||
| In order words, atan2(y, x) = atan(y / x) just like in C++ and Python. | In order words, atan2(y, x) = atan(y / x) just like in C++ and Python. | ||
| + | |||
| + | ===Table 8.11: bezier=== | ||
| + | |||
| + | The ''r'' in the formula should have a subscript of ''i'' | ||
| ===Page 168: faceforward=== | ===Page 168: faceforward=== | ||
Revision as of 21:06, 14 September 2005
Here are the errors/typos we are aware of from the first edition of the book. Please comment on this page if you have found something that isn't listed yet.
Contents |
Page 18: missing word
The first sentence on the page is missing a word:
"Basically, sequences of calls into an API can be interpreted as a ..."
Page 28: wrong z convention noted
Second paragraph from the bottom:
"Values of z at the near plane are mapped to 0, those close to the far plane are mapped to 1. This follows OpenGL conventions."
should be
"Values of z at the near plane are mapped to -1, those close to the far plane are mapped to 1. This follows OpenGL conventions."
Page 29: our->are
In middle of first full paragraph on page:
"Therefore, some simplifications to our shaders our possible in the ..."
should be
"Therefore, some simplifications to our shaders are possible in the ..."
Listing 5.3: p -> update
The last line of the listing,
ShProgram update_state = p << state;
should be
ShProgram update_state = update << state;
Table 8.9: atan2
The definition of atan2() should be
arctangent of a / b
instead of
arctangent of b / a
In order words, atan2(y, x) = atan(y / x) just like in C++ and Python.
Table 8.11: bezier
The r in the formula should have a subscript of i
Page 168: faceforward
The math should be
/ b if dot(a, b) > 0,
r <- |
\ -b otherwise
Rather than
/ a if dot(a, b) > 0,
r <- |
\ -a otherwise
(ie. return b instead of a).
Page 219: result.depth
result.depth is mapped to SH_POSITION, not SH_ATTRIB.
Index
"ShInterpolate modifier" should be "ShInterp modifier"
