Metaprogramming GPUs with Sh Errata

From ShWiki

(Difference between revisions)

Revision as of 20:30, 14 September 2005

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;

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"