View Full Version : glLightModeli function
03-01-2001, 10:52 AM
I am trying to find the specular reflection of a vertex.The last value of glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE); function can be GL_TRUE(1) or GL_FALSE(0).When it is 1 the viewpoint is at position (0,0,0) from which i subrstract the vertex1 and normalise the result to find the view vector.When the last value is 0 what's the difference?Is there any possibility to have specular reflection? Thanx!
03-02-2001, 02:29 AM
A non-local viewer is at infinty on the z-axis.
The specular calculations don't take the half angle between difference vector from (viewer - vertex) and (light - vertex) vectors then, but always calculate the half angle between z-axis and (light - vertex) vector.
Using non-local viewer can improve lighting performance.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.