View Full Version : Own specular lighting
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?
In opengl you can choose between the angle towards the camera plane, or the camera point, this gives different results.
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.
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.
That was it. Thanks now it works correctly.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.