PDA

View Full Version : getting the L and H vectors?



Lurking
08-07-2002, 01:22 PM
Hello, Im looking at this slide on per pixel lighting(http://developer.nvidia.com/docs/IO/1273/ATT/BumpMappingWithRegisterCombiners.pdf). 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

kon
08-07-2002, 10:44 PM
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.

kon

Ninja
08-07-2002, 11:28 PM
To get access to the secondary color you have to use the extension right?

-Ninja

kon
08-08-2002, 01:15 AM
Yes, GL_EXT_secondary_color is needed.