How do I compute the lighting in my vertex program so that the result is the same as not using the program ??? (i.e. GL_LIGHT0 has default parameters… I can post them if needed…).
I had a look at nVidia’s examples (especially the “simple specular and diffuse lighting with an eye-space normal”) but I do not think it is what I want to do: they use a half-angle vector (?) which never appears when using OpenGL (or does it ?).
Thanks to anyone who can help me on this one (and to the others as well ! ) !
Best Regards !
Eric
P.S.: isn’t there a way to put comments in the vertex program string ??? Each time I try the “#” as stated in the specs, nvoglnt.dll crashes !!!
To compute the lighting, typically do something like a dot product with a light vector and the vertex normal (parallel light) or for point light source simply make a vector to the light source from the vertex, and use that vector with the vertex normal.
Then just multiply the value you got with the incoming color, and store in outgoing color… or somat like that…
As for lighting properties… I’m not too sure on that at the mo… typically I just load the position into a C register for us in the program.
Mail me this detonator 10 driver please. ta.
I get crashes with comments in 7.17 too… bit annoying… cos I keep losing track of which instructions are doing what… (they all look the same… )
JK: As NVidia states on the page of the OpenGL SDK: if you are are NVidia registered developer you can get the Detonator 10.4 drivers from the registered developers driver section of their website.