• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1XXX - Not complete yet!!!
2
3Name
4
5    SGIX_texture_phase
6
7Name Strings
8
9    GL_SGIX_texture_phase
10
11Version
12
13    $Date: 1997/12/08 19:59:59 $ $Revision: 1.3 $
14
15Number
16
17    ??
18
19Dependencies
20
21    None
22
23Overview
24
25    This extension allows textures to filtered using a modified LINEAR
26    filter that treats the texture data as phase angle.  (In addition
27    to the NEAREST and LINEAR filters defined in the original GL
28    Specification.) Such filtering is useful for dopler data where
29    texel values correspond to positions on a unit circle or phase
30    angles.
31
32Issues
33
34    *
35
36Reasoning
37
38    *
39
40New Procedures and Functions
41
42    None
43
44New Tokens
45
46    Accepted by the <param> parameter of TexParameteri and
47    TexParameterf, and by the <params> parameter of TexParameteriv and
48    TexParameterfv, when their <pname> parameter is
49    TEXTURE_MIN_FILTER or TEXTURE_MAG_FILTER:
50
51	PHASE_SGIX		0x832A
52
53Additions to Chapter 2 of the GL Specification (OpenGL Operation)
54
55    None
56
57Additions to Chapter 3 of the GL Specification (Rasterization)
58
59    The additional token value PHASE_SGIS is accepted as an enumerated
60    value for the texture minification and magnification filters, causing
61    Table 3.7 to be replaced with the table below:
62
63	Name				Type		Legal Values
64	----				----		------------
65	TEXTURE_WRAP_S			integer		CLAMP, REPEAT
66	TEXTURE_WRAP_T			integer		CLAMP, REPEAT
67	TEXTURE_WRAP_R_EXT		integer		CLAMP, REPEAT
68	TEXTURE_MIN_FILTER		integer		NEAREST, LINEAR,
69							NEAREST_MIPMAP_NEAREST,
70							NEAREST_MIPMAP_LINEAR,
71							LINEAR_MIPMAP_NEAREST,
72							LINEAR_MIPMAP_LINEAR,
73							FILTER4_SGIS,
74							PHASE_SGIS
75	TEXTURE_MAG_FILTER		integer		NEAREST, LINEAR,
76							FILTER4_SGIS,
77							PHASE_SGIX
78	TEXTURE_BORDER_COLOR		4 floats	any 4 values in [0,1]
79
80	Table 3.7: Texture parameters and their values.
81
82    Phase filtering is specified by calling TexParameteri,
83    TexParameterf, TexParameteriv, or TexParameterfv with <pname> set
84    to TEXTURE_MIN_FILTER or TEXTURE_MAG_FILTER, and <param> or <params>
85    set to PHASE_SGIS. Because phase filtering is defined only for
86    non-mipmapped textures, there is no difference between its
87    definition for minification and magnification.
88
89    First consider the 1-dimensional case.  Let T be a computed texture
90    value (one of R_t, G_t, B_t, or A_t).  Let T[i] be the component
91    value of the texel at location i in a 1-dimensional texture image.
92    Then, if the appropriate texture filter mode is PHASE_SGIX, a
93    2-texel group is selected:
94
95
96	      /	floor(u - 1/2) mod 2**n,	TEXTURE_WRAP_S is REPEAT
97	i0 = (
98	      \	floor(u - 1/2),			TEXTURE_WRAP_S is CLAMP
99
100
101	      /	(i0 + 1) mod 2**n,		TEXTURE_WRAP_S is REPEAT
102	i1 = (
103	      \	i0 + 1,				TEXTURE_WRAP_S is CLAMP
104
105
106   Let
107
108	A = frac(u - 1/2)
109
110    where frac(x) denotes the fractional part of x, and u is the
111    texture image coordinate in the s direction, as illustrated in
112    Figure 3.10 of the GL Specification.  Then the texture value T is
113    found as:
114
115	t0 = T[i0]
116	t1 = T[i1]
117	del = t1 - t0
118	if |del| > 0.5 then
119	    t0 = t0 + sign(del)
120	T = frac((1-A) * t0 + A * t1)
121
122    If any of the selected T[i] in the above equation refer to a border
123    texel with unspecified value, then the border color given by the
124    current setting of TEXTURE_BORDER_COLOR is used instead of the
125    unspecified value.
126
127    For 2-dimensional textures the calculations for i0, i1, and
128    A are identical to the 1-dimensional case.  A 4-texel group is
129    selected, requiring two j values computed as
130
131
132	      /	floor(v - 1/2) mod 2**m,	TEXTURE_WRAP_T is REPEAT
133	j0 = (
134	      \	floor(v - 1/2),			TEXTURE_WRAP_T is CLAMP
135
136
137	      /	(j0 + 1) mod 2**m,		TEXTURE_WRAP_T is REPEAT
138	j1 = (
139	      \	j0 + 1,				TEXTURE_WRAP_T is CLAMP
140
141    Let
142
143	B = frac(v - 1/2)
144
145    where v is the texture image coordinate in the t direction, as
146    illustrated in Figure 3.10 of the GL Specification.  Then the
147    texture value T is found as:
148
149	t00 = T[i0,j0]
150	t01 = T[i0,j1]
151	t10 = T[i1,j0]
152	t11 = T[i1,j1]
153	del = t10 - t00
154	if |del| > 0.5 then
155	    t00 = t00 + sign(del)
156	t0 = frac((1-A) * t00 + A * t10)
157	del = t11 - t01
158	if |del| > 0.5 then
159	    t01 = t01 + sign(del)
160	t1 = frac((1-A) * t01 + A * t11)
161	del = t1 - t0
162	if |del| > 0.5 then
163	    t0 = t0 + sign(del)
164	T = frac((1-A) * t0 + A * t1)
165
166    If any of the selected T[i,j] in the above equation refer to a
167    border texel with unspecified value, then the border color given by
168    the current setting of TEXTURE_BORDER_COLOR is used instead of the
169    unspecified value.
170
171    Phase texture filtering is similarly defined for 3-dimensional
172    textures.
173
174
175Additions to Chapter 4 of the GL Specification (Per-Fragment Operations
176and the Framebuffer)
177
178    None
179
180Additions to Chapter 5 of the GL Specification (Special Functions)
181
182    None
183
184Additions to Chapter 6 of the GL Specification (State and State Requests)
185
186    None
187
188Additions to the GLX Specification
189
190    None
191
192GLX Protocol
193
194
195Errors
196
197
198New State
199
200
201New Implementation Dependent State
202
203