• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    SGIX_texture_supersample
4
5Name Strings
6
7    GL_SGIX_texture_supersample
8
9Version
10
11    $Date: 1997/07/17 03:04:37 $ $Revision: 1.1 $
12
13Number
14
15    XXX
16
17Dependencies
18
19    SGIX_texture_lod_bias affects the definition of this extension
20
21Overview
22
23    This extension introduces high quality texture minification
24    filters which do not require prefiltering or multiple level of detail
25    maps.  The texture map is supersampled based on a pixel's projected
26    footprint in texture space.  The weighted average of the samples is
27    used as the texture value for the pixel.
28
29Issues
30
31    * Should 3D textures be supported? Not for now.
32    * Should the TEXTURE_SUPERSAMPLE_WIDTH_SGIX greater than 1 be supported?
33      Dignam would like to consider supporting them -- they will be quite slow.
34
35New Procedures and Functions
36
37    None
38
39New Tokens
40
41    Accepted by the <pname> parameter of TexParameteri and TexParameterf,
42    and by the <pname> parameter of TexParameteriv and TexParameterfv.
43
44        TEXTURE_SUPERSAMPLE_WIDTH_SGIX
45
46    Accepted by the <param> parameter of TexParameteri and TexParameterf,
47    and by the <params> parameter of TexParameteriv and TexParameterfv, when
48    their <pname> parameter is TEXTURE_MIN_FILTER.
49
50        LINEAR_SUPERSAMPLE_SGIX
51        FILTER4_SUPERSAMPLE_SGIX
52
53
54Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
55
56    None
57
58Additions to Chapter 3 of the 1.1 Specification (Rasterization)
59
60    GL Specification Table 3.9 is updated with the addition of:
61
62	Name				Type	    Legal Values
63	----				----	    ------------
64	TEXTURE_MIN_FILTER		integer	    LINEAR_SUPERSAMPLE_SGIX,
65						    FILTER4_SUPERSAMPLE_SGIX
66
67        TEXTURE_SUPERSAMPLE_WIDTH_SGIX  integer	    1, 2, or 4
68
69   Texture Minification
70   ------------------------
71
72   This extensions substantially changes Section 3.8.1.  Previously
73   a single scale factor P was determined based on the pixel's projection
74   into texture space.  Now two scale factors, Px and Py, are computed.
75
76   Px = sqrt(dudx^2 + dvdx^2)
77   Py = sqrt(dudy^2 + dvdy^2)
78
79   It is also acceptable for an implementation to approximate the ideal
80   functions Px and Py with functions Fx and Fy subject to the following
81   conditions:
82
83   1.  Fx is continuous and monotonically increasing in |du/dx| and |dv/dx|.
84       Fy is continuous and monotonically increasing in |du/dy| and |dv/dy|.
85
86   2.  max(|du/dx|,|dv/dx|} <= Fx <= |du/dx| + |dv/dx|.
87       max(|du/dy|,|dv/dy|} <= Fy <= |du/dy| + |dv/dy|.
88
89   LamdaX = log2(Px)
90   LamdaY = log2(Py)
91
92   Nx = round (2^LamdaX);
93   Ny = round (2^LamdaY);
94
95
96   Instead of a single sample, Tau, at (u,v), Nx x Ny locations of the
97   texture at LOD 0 are sampled and averaged as follows:
98
99                  i=Nx,j=Ny
100                  ---
101   Tau =1/(Nx*Ny) \ Tau( u_sub_ij, v_sub_ij);
102	          /
103                  ---
104         	  i=1,j=1
105    where:
106
107    u_sub_ij = u(x - 0.5 + i/(Nx+1), y - 0.5 + j/(Ny+1));
108    v_sub_ij = v(x - 0.5 + i/(Nx+1), y - 0.5 + j/(Ny+1));
109
110
111    It is acceptable to reduce the smaller of Nx and Ny as the pixel
112    footprint collapses to a line, so long as the sampling rate of the texture
113    coordinates with respect to each of the screen coordinates is maintained.
114
115    The sampling function for Tau(u,v) will be LINEAR if TEXTURE_MIN_FILTER is
116    LINEAR_SUPERSAMPLE_SGIX, and FILTER4_SGIS if TEXTURE_MIN_FILTER is
117    FILTER4_SUPERSAMPLE_SGIX.
118
119    The default resampling filter is an equal weighted box filter.  A linear
120    or cubic filter may be specified by setting the
121    TEXTURE_SUPERSAMPLE_WIDTH_SGIX from 1 to 2 or 4.
122
123    When TEXTURE_SUPERSAMPLE_WIDTH_SGIX is 2, the width and height
124    of the pixel footprint in screen space will double, and a linear filter
125    centered at the center of the pixel will be used to weight each sample.
126
127    When TEXTURE_SUPERSAMPLE_WIDTH_SGIX is 4, the width and height
128    of the pixel footprint in screen space will quadruple, and the FILTER4_SGIS
129    texture filter function will be used to weight each sample.
130
131Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
132and the Frame Buffer)
133
134    None
135
136Additions to Chapter 5 of the 1.1 Specification (Special Functions)
137
138    None
139
140Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
141
142    None
143
144Additions to the GLX Specification
145
146    None
147
148Dependencies on SGIX_texture_lod_bias
149
150    If SGIX_texture_lod_bias is supported, dudx, dvdx, dwdx, dudy, dvdy, dwdy
151    are replaced with dlodudx, dlodvdx, dlodwdx, dlodudy, dlodvdy, dlodwdy in
152    the Px and Py functions.
153
154Dependencies on SGIX_texture_lod
155
156   LamdaX and LamdaY are clamped to the range [MIN_LOD, MAX_LOD] if the
157   SGIS_texture_lod extension is supported.
158
159Errors
160
161    None
162
163New State
164
165								Initial
166    Get Value			    Get Command	     Type	Value	  Attrib
167    ---------			    -----------	     ----	-------	  ------
168    TEXTURE_SUPERSAMPLE_WIDTH_SGIX  GetTexParameteriv Z1*         1        texture
169
170New Implementation Dependent State
171
172                                                                        Minimum
173    Get Value                           Get Command     Type            Value
174    ---------                           -----------     ----            -------
175    MAX_TEXTURE_SUPERSAMPLE_WIDTH       GetIntegerv     Z1*              1
176