News

Book Cover

Book Contents

Files

About the Authors

Errata

Errata

"Fundamentals of Vertex Shaders"
by Wolfgang F. Engel
page 35 - The following paragraph is misleading:
"Vertex Shaders are executed with SetVertexShader() as many times as there are vertices. For example if you try to visualize a rotating quad with four vertices implemented as an indexed triangle list, you will see in the NVIDIA Shader Debugger, that the vertex shader runs four times, before the DrawPrimitive*() function is called. "

The correct paragraph is:

"Vertex Shaders are set with SetVertexShader() and executed with a call to DrawPrimitive*() function as often as there are vertices. For example if you try to visualize a rotating quad with four vertices implemented as an indexed triangle list, you will see in the NVIDIA Shader Debugger, that the vertex shader runs four times.

"Fundamentals of Vertex Shaders"
by Wolfgang F. Engel
Tip from Markus Kobler:
I have just purchased your very good shader book, and have just came up against a very small problem which I'm embarrassed to say took me about an hour to figure out what was wrong.
On page 50 you explain how to run NVASM internally from Visual Studio and it was complaining that I was supplying too many variables. Anyway it turns out I had to change the line:

nvasm.exe $(InputPath) shaders\$(InputName).vso

to

nvasm.exe "$(InputPath)" "shaders\$(InputName).vso"

The problem by missing the " it was sending file strings from C:\Documents and Settings\etc\... and the spaces were cocking it up. I'm using visual studio .net so it may just be a problem with this version of the MS complier but I thought it was worth mentioning to save some other half awake people some grief.

Anyway
Keep up the good work

Markus

"Lighting A Single-Surface Object"
by Greg James
page 211 - Code fragment missing minus sign on last V_NORMAL -- ie it should be -V_NORMAL.
This is the correct code to put in:
sub INV_MASK, c[ONE], MASK
mul COR_NORMAL, MASK, V_NORMAL
mad COR_NORMAL, INV_MASK, -V_NORMAL, COR_NORMAL

 

"A Non-Integer Power Function on the Pixel Shader"
by Philippe Beaudoin and Juan Guardado
Here are better images for this article:


Figure 1. Gouraud shading (left) and Phong shading (right)



Figure 12. Per pixel Phong shading on spheres. Clockwise from upper left, uniform normal and exponent maps, uniform normal map and faceted exponent map, noisy normal and exponent maps with uniform orange specular material, and noisy normal and exponent maps with uniform white specular material.

Logo: 2001-2002 Javier Izquierdo, Lanzarote, Spain
Content: 2001 - 2002 Wolfgang Engel, Frankenthal, Germany