PDA

View Full Version : Own specular lighting



10-27-2002, 03:20 PM
I am allowing the user to switch between my own lighting and OpenGL's lighting (for T&L cards). Ambient and diffuse light look the same in both modes. But specular is very much brighter in OpenGL's lighting. I use the formula in the Red Book. (dotproduct of ((normalization of camera - vertex) + light_vector)) * specular_component... What am I doing wrong?

Thomas

Mazy
10-27-2002, 11:23 PM
In opengl you can choose between the angle towards the camera plane, or the camera point, this gives different results.

10-28-2002, 04:51 AM
This does not seem to be the problem. On a sphere the light concentrates on the same point, but the OpenGL version is very much brighter.

-- Thomas

*Aaron*
10-28-2002, 06:04 AM
Are you incorporating the "shininess" parameter into your lighting equation? I am assuming that the ellipsis at the end of the equation means you left some of it off in your post. It would help if you posted the entire equation for those of us who don't have the Red Book.

10-29-2002, 04:42 AM
That was it. Thanks now it works correctly.