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
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