getting the L and H vectors?

Hello, Im looking at this slide on per pixel lighting( The problem im having undertanding how you get the L and H vectors w/o using cubemaps. On slide 17 it says that i should supply L as a RGB color i.e. glColor3f. The only problem is that i dont know how i could do the dot products in the register combiners. I would like to use nvparse for ease of use. Could someone explain how to use the L and H vectors in nvparse w/o using a cubemap?

  • Lurking

For each vertex put the L vector into its primary and the H vector into the secondary color which you then can access in the register combiners.
The L and H vectors can of course have negative values, so first compress them from their (normalized) range [-1,1] to [0,1] and in the register combiners use the “Expand_Normal” input mapping.


To get access to the secondary color you have to use the extension right?


Yes, GL_EXT_secondary_color is needed.