• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1XXX - incomplete
2
3PRELIMINARY - NOT COMPLETE
4--------------------------
5
6Name
7
8    HP_texture_lighting
9
10Name Strings
11
12    GL_HP_texture_lighting
13
14Version
15
16    1.0
17
18Number
19
20    111
21
22Dependencies
23
24    OpenGL 1.1
25
26Overview
27
28    This extension defines a mechanism for applications to request
29    that color originating from specular lighting be added to
30    the fragment color _after_ texture application.
31
32New Procedures And Functions
33
34    None
35
36New Tokens
37
38    Accepted by the <pname> parameter of TexEnvf, TexEnvfv, TexEnvi,
39    TexEnviv:
40
41	TEXTURE_LIGHTING_MODE_HP
42
43    Accepted by the <param> parameter of TexEnvf, TexEnvfv, TexEnvi,
44    TexEnviv when <pname> is TEXTURE_APP_MODE_HP:
45
46	TEXTURE_POST_SPECULAR_HP
47	TEXTURE_PRE_SPECULAR_HP
48
49Additions to Chapter 2 of the GL Specification (OpenGL Operation)
50
51    Lighting Operation
52
53	If the texture application mode is TEXTURE_POST_SPECULAR_HP, the
54	color c produced by lighting a vertex is given by:
55
56	    c	= e
57		   cm
58
59		+ a   *  a
60		   cm     cs
61
62		  n-1
63		+ SUM (att )(spot )[a   * a
64		  i=0     i      i   cm    cli
65
66				+   (n @ VP   )d   * d
67					   pli  cm    cli
68
69						srm
70				+   (f )(n @ h )    s   * s]
71				      i       i      cm    cli
72
73	If the texture application mode is TEXTURE_PRE_SPECULAR_HP, and
74	if texturing is enabled, two lighting components are computed
75	separately per vertex.
76
77	Emissive, ambient, and diffuse color, c   :
78					       ead
79
80	    c	= e
81	     ead   cm
82
83		+ a   *  a
84		   cm     cs
85
86		  n-1
87		+ SUM (att )(spot )[a   * a
88		  i=0     i      i   cm    cli
89
90				+   (n @ VP   )d   * d]
91					   pli  cm    cli
92
93	Specular color, c :
94			 s
95
96		  n-1                          srm
97	    c	= SUM (att )(spot )(f )(n @ h )    s   * s
98	     s	  i=0     i      i   i       i      cm    cli
99
100	These terms are then added after texture application, and the
101	final (clamped) color used as the fragment color.
102
103
104Additions to Chapter 3 of the GL Specification (Rasterization)
105
106			Point
107	       +--> Rasterization -->+
108               |		     |
109      From     |	Line	     |
110    Primitive -+--> Rasterization -->+
111    Assembly   |                     |
112	       |      Polygon        |
113	       +--> Rasterization -->+---> Texturing ---> Specular ---> Fog
114				     |
115		        Pixel	     |
116    DrawPixels --->   Rectangle ---->+
117		    Rasterization    |
118				     |
119			Bitmap	     |
120      Bitmap -----> Rasterization -->+
121
122    Figure 3.1, rasterization
123
124
125    3.8.5 Texture Environments and Texture Functions
126
127	If the texture application mode is TEXTURE_PRE_SPECULAR_HP,
128	R , G , and B  refer to c   , the emissive, ambient, and diffuse color.
129	 f   f       f           ead
130
131    3.8a Specular
132
133	If the texture application mode is TEXTURE_PRE_SPECULAR_HP and
134	texturing is enabled, then the separate specular lighting
135	coefficient interpolated for this fragment is added in at this
136	stage.  The result is clamped before sending the fragment color
137	to subsequent stages.  If the texture application mode is
138	TEXTURE_POST_SPECULAR_HP, this stage is not enabled.
139
140Additions to Chapter 4 of the GL Specification (Per-Fragment Operations
141and the Framebuffer)
142
143    None
144
145Additions to Chapter 5 of the GL Specification (Special Functions)
146
147    None
148
149Additions to Chapter 6 of the GL Specification (State and State Requests)
150
151    Get value		     Type Initial value		    Description		      Sec	 Attribute
152    TEXTURE_LIGHTING_MODE_HP  Z4  TEXTURE_POST_SPECULAR_HP  Texture application mode  3.8a	 texture
153
154Additions to the GLX Specification
155
156    None
157
158GLX Protocol
159
160    TBD - ?
161
162Errors
163
164    INVALID_ENUM is generated if the <pname> parameter of TexEnvi,
165      TexEnviv, TexEnvf, or TexEnvf is TEXTURE_LIGHTING_MODE_HP and
166      the <param> parameter is not one of TEXTURE_POST_SPECULAR_HP or
167      TEXTURE_PRE_SPECULAR_HP.
168
169New State
170
171    None
172
173New Implementation Dependent State
174
175    None
176
177