1XXX - Not complete yet!!! 2 3Name 4 5 APPLE_specular_vector 6 7Name Strings 8 9 GL_APPLE_specular_vector 10 11Version 12 13 $Date: 1999/02/13 08:11:19 $ $Revision: 1.1 $ 14 15Number 16 17 159 18 19Dependencies 20 21 None 22 23Overview 24 25 An alternative specular lighting model is enabled by passing 26 the LIGHT_MODEL_SPECULAR_VECTOR token as the <pname> parameter 27 to LightModel, and TRUE as the <param> parameter. The specular 28 vector lighting model calculates the specular intensity as the 29 dot product of the true reflection vector of the light source 30 and the vector from the vertex to the viewpoint. This yields 31 results that are visually similar to but often more realistic 32 than the existing lighting model. 33 34 Mathematically, the specular component s.n in the existing 35 lighting model calculation is replaced with the following 36 alternative calculation. 37 38 Given three vectors, n, l, and p, where n is the unit normal 39 vector at the vertex, l is the unit vector from the vertex to 40 the light position, and p is the unit vector from the vertex 41 to the viewpoint (or the vector {0,0,1} if 42 LIGHT_MODEL_LOCAL_VIEWER is false), the specular component is 43 given by 44 45 (2 * cross(n, cross(n, l)) + l) . p 46 47 All other lighting model and material parameters (shininess, 48 spotlight, attenuation, local viewer, and direction/positional 49 sources) operate normally. The specular vector lighting model 50 affects both rgba and index modes. 51 52New Procedures and Functions 53 54 None 55 56New Tokens 57 58 Accepted by the <pname> parameters of LightModelf, LightModeli, 59 LightModelfv, LightModeliv, GetBooleanv, GetDoublev, GetFloatv 60 and GetIntegerv : 61 62 LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 63 64Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation) 65 66 XXX - Not complete yet!!! 67 68 Section 2.13.1, Lighting 69 Table 2.7 should be appended to include: 70 "S_bs boolean FALSE use specular vector lighting model" 71 72 Equations 2.2 and 2.3 should be updated to reflect the modified 73 h_i terms in the specular component, as described above. 74 75 Section 2.13.2, Lighting Parameter Specification 76 Table 2.8 should be appended to include: 77 "S_bs LIGHT_MODEL_SPECULAR_VECTOR 1" 78 79Additions to Chapter 3 of the 1.1 Specification (Rasterization) 80 81 None 82 83Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations 84and the Frame Buffer) 85 86 None 87 88Additions to Chapter 5 of the 1.1 Specification (Special Functions) 89 90 None 91 92Additions to Chapter 6 of the 1.1 Specification (State and State Requests) 93 94 Not done 95 96Additions to the GLX Specification 97 98GLX Protocol 99 100 None 101 102Errors 103 104 None 105 106New State 107 108 Get Value Get Command Type Initial Value Attrib 109 --------------------------------- ----------- ---- ------------- -------- 110 LIGHT_MODEL_SPECULAR_VECTOR_APPLE GetBooleanv B False lighting 111 112New Implementation Dependent State 113 114 None 115