PDA

View Full Version : Small nooB question.


hyperzoanoid
2003.04.24, 11:43 PM
Hi im reading chapter 6 of the opengl programming guide by silicon graphics, which deals on lighting. There is a section on the bottom called mathematics of lighting where an equation is given for lighting a vertex.


vertex color = emissionmaterial +

ambientlight model * ambientmaterial +

spotlighteffect[ ambientlight *ambientmaterial +

(max { 1 x n , 0 } ) * diffuselight * diffusematerial +

(max {s x n ,0} )shininess * specularlight * specularmaterial ] i

now i get all this except for the 'i' at the end of the equation. By 'i' do they mean imaginary number, or is it a typo? And if its an imaginary number, how do you specify it as one in code?

heres the link.

http://fly.cc.fer.hr/~unreal/theredbook/chapter06.html

DoG
2003.04.24, 11:54 PM
there should be a picture in form of an equation in there (as in my local copy), it defines i, which is the number of the current light light, with i going from 0 to number of lights - 1.

hyperzoanoid
2003.04.25, 12:13 AM
so 'i' is one of those 8 lights allowable by opengl?

DoG
2003.04.25, 02:23 PM
yes, it refers to the specific parameters of one of the lights.