blob: 07ae7e084070e130067f82fb7ee0c1b2972d48dc [file] [log] [blame]
XXX - Not complete yet!!!
Name
APPLE_specular_vector
Name Strings
GL_APPLE_specular_vector
Version
$Date: 1999/02/13 08:11:19 $ $Revision: 1.1 $
Number
159
Dependencies
None
Overview
An alternative specular lighting model is enabled by passing
the LIGHT_MODEL_SPECULAR_VECTOR token as the <pname> parameter
to LightModel, and TRUE as the <param> parameter. The specular
vector lighting model calculates the specular intensity as the
dot product of the true reflection vector of the light source
and the vector from the vertex to the viewpoint. This yields
results that are visually similar to but often more realistic
than the existing lighting model.
Mathematically, the specular component s.n in the existing
lighting model calculation is replaced with the following
alternative calculation.
Given three vectors, n, l, and p, where n is the unit normal
vector at the vertex, l is the unit vector from the vertex to
the light position, and p is the unit vector from the vertex
to the viewpoint (or the vector {0,0,1} if
LIGHT_MODEL_LOCAL_VIEWER is false), the specular component is
given by
(2 * cross(n, cross(n, l)) + l) . p
All other lighting model and material parameters (shininess,
spotlight, attenuation, local viewer, and direction/positional
sources) operate normally. The specular vector lighting model
affects both rgba and index modes.
New Procedures and Functions
None
New Tokens
Accepted by the <pname> parameters of LightModelf, LightModeli,
LightModelfv, LightModeliv, GetBooleanv, GetDoublev, GetFloatv
and GetIntegerv :
LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
XXX - Not complete yet!!!
Section 2.13.1, Lighting
Table 2.7 should be appended to include:
"S_bs boolean FALSE use specular vector lighting model"
Equations 2.2 and 2.3 should be updated to reflect the modified
h_i terms in the specular component, as described above.
Section 2.13.2, Lighting Parameter Specification
Table 2.8 should be appended to include:
"S_bs LIGHT_MODEL_SPECULAR_VECTOR 1"
Additions to Chapter 3 of the 1.1 Specification (Rasterization)
None
Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
and the Frame Buffer)
None
Additions to Chapter 5 of the 1.1 Specification (Special Functions)
None
Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
Not done
Additions to the GLX Specification
GLX Protocol
None
Errors
None
New State
Get Value Get Command Type Initial Value Attrib
--------------------------------- ----------- ---- ------------- --------
LIGHT_MODEL_SPECULAR_VECTOR_APPLE GetBooleanv B False lighting
New Implementation Dependent State
None