15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    SGIX_texture_supersample
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_SGIX_texture_supersample
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    $Date: 1997/07/17 03:04:37 $ $Revision: 1.1 $
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNumber
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    XXX
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciDependencies
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    SGIX_texture_lod_bias affects the definition of this extension
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciOverview
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    This extension introduces high quality texture minification 
245bd8deadSopenharmony_ci    filters which do not require prefiltering or multiple level of detail
255bd8deadSopenharmony_ci    maps.  The texture map is supersampled based on a pixel's projected 
265bd8deadSopenharmony_ci    footprint in texture space.  The weighted average of the samples is 
275bd8deadSopenharmony_ci    used as the texture value for the pixel.
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ciIssues
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ci    * Should 3D textures be supported? Not for now.
325bd8deadSopenharmony_ci    * Should the TEXTURE_SUPERSAMPLE_WIDTH_SGIX greater than 1 be supported?
335bd8deadSopenharmony_ci      Dignam would like to consider supporting them -- they will be quite slow.
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ciNew Procedures and Functions
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ci    None
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ciNew Tokens
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci    Accepted by the <pname> parameter of TexParameteri and TexParameterf,
425bd8deadSopenharmony_ci    and by the <pname> parameter of TexParameteriv and TexParameterfv.
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci        TEXTURE_SUPERSAMPLE_WIDTH_SGIX
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci    Accepted by the <param> parameter of TexParameteri and TexParameterf,
475bd8deadSopenharmony_ci    and by the <params> parameter of TexParameteriv and TexParameterfv, when
485bd8deadSopenharmony_ci    their <pname> parameter is TEXTURE_MIN_FILTER.  
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci        LINEAR_SUPERSAMPLE_SGIX
515bd8deadSopenharmony_ci        FILTER4_SUPERSAMPLE_SGIX
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci    None
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.1 Specification (Rasterization)
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ci    GL Specification Table 3.9 is updated with the addition of:
615bd8deadSopenharmony_ci
625bd8deadSopenharmony_ci	Name				Type	    Legal Values
635bd8deadSopenharmony_ci	----				----	    ------------
645bd8deadSopenharmony_ci	TEXTURE_MIN_FILTER		integer	    LINEAR_SUPERSAMPLE_SGIX,
655bd8deadSopenharmony_ci						    FILTER4_SUPERSAMPLE_SGIX
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci        TEXTURE_SUPERSAMPLE_WIDTH_SGIX  integer	    1, 2, or 4
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci   Texture Minification
705bd8deadSopenharmony_ci   ------------------------
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci   This extensions substantially changes Section 3.8.1.  Previously
735bd8deadSopenharmony_ci   a single scale factor P was determined based on the pixel's projection
745bd8deadSopenharmony_ci   into texture space.  Now two scale factors, Px and Py, are computed.
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ci   Px = sqrt(dudx^2 + dvdx^2)
775bd8deadSopenharmony_ci   Py = sqrt(dudy^2 + dvdy^2)
785bd8deadSopenharmony_ci 
795bd8deadSopenharmony_ci   It is also acceptable for an implementation to approximate the ideal 
805bd8deadSopenharmony_ci   functions Px and Py with functions Fx and Fy subject to the following
815bd8deadSopenharmony_ci   conditions:
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci   1.  Fx is continuous and monotonically increasing in |du/dx| and |dv/dx|.
845bd8deadSopenharmony_ci       Fy is continuous and monotonically increasing in |du/dy| and |dv/dy|.
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci   2.  max(|du/dx|,|dv/dx|} <= Fx <= |du/dx| + |dv/dx|.
875bd8deadSopenharmony_ci       max(|du/dy|,|dv/dy|} <= Fy <= |du/dy| + |dv/dy|.
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ci   LamdaX = log2(Px)
905bd8deadSopenharmony_ci   LamdaY = log2(Py)
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci   Nx = round (2^LamdaX);
935bd8deadSopenharmony_ci   Ny = round (2^LamdaY);
945bd8deadSopenharmony_ci  
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci   Instead of a single sample, Tau, at (u,v), Nx x Ny locations of the 
975bd8deadSopenharmony_ci   texture at LOD 0 are sampled and averaged as follows:
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ci                  i=Nx,j=Ny
1005bd8deadSopenharmony_ci                  ---
1015bd8deadSopenharmony_ci   Tau =1/(Nx*Ny) \ Tau( u_sub_ij, v_sub_ij);
1025bd8deadSopenharmony_ci	          /          
1035bd8deadSopenharmony_ci                  ---	       
1045bd8deadSopenharmony_ci         	  i=1,j=1
1055bd8deadSopenharmony_ci    where:
1065bd8deadSopenharmony_ci
1075bd8deadSopenharmony_ci    u_sub_ij = u(x - 0.5 + i/(Nx+1), y - 0.5 + j/(Ny+1));
1085bd8deadSopenharmony_ci    v_sub_ij = v(x - 0.5 + i/(Nx+1), y - 0.5 + j/(Ny+1));
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci    It is acceptable to reduce the smaller of Nx and Ny as the pixel 
1125bd8deadSopenharmony_ci    footprint collapses to a line, so long as the sampling rate of the texture
1135bd8deadSopenharmony_ci    coordinates with respect to each of the screen coordinates is maintained.
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci    The sampling function for Tau(u,v) will be LINEAR if TEXTURE_MIN_FILTER is 
1165bd8deadSopenharmony_ci    LINEAR_SUPERSAMPLE_SGIX, and FILTER4_SGIS if TEXTURE_MIN_FILTER is 
1175bd8deadSopenharmony_ci    FILTER4_SUPERSAMPLE_SGIX.
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci    The default resampling filter is an equal weighted box filter.  A linear
1205bd8deadSopenharmony_ci    or cubic filter may be specified by setting the 
1215bd8deadSopenharmony_ci    TEXTURE_SUPERSAMPLE_WIDTH_SGIX from 1 to 2 or 4.
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ci    When TEXTURE_SUPERSAMPLE_WIDTH_SGIX is 2, the width and height
1245bd8deadSopenharmony_ci    of the pixel footprint in screen space will double, and a linear filter
1255bd8deadSopenharmony_ci    centered at the center of the pixel will be used to weight each sample.
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci    When TEXTURE_SUPERSAMPLE_WIDTH_SGIX is 4, the width and height
1285bd8deadSopenharmony_ci    of the pixel footprint in screen space will quadruple, and the FILTER4_SGIS
1295bd8deadSopenharmony_ci    texture filter function will be used to weight each sample.
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
1325bd8deadSopenharmony_ciand the Frame Buffer)
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci    None
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.1 Specification (Special Functions)
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci    None
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.1 Specification (State and State Requests)
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    None
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ciAdditions to the GLX Specification
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci    None
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ciDependencies on SGIX_texture_lod_bias
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci    If SGIX_texture_lod_bias is supported, dudx, dvdx, dwdx, dudy, dvdy, dwdy 
1515bd8deadSopenharmony_ci    are replaced with dlodudx, dlodvdx, dlodwdx, dlodudy, dlodvdy, dlodwdy in 
1525bd8deadSopenharmony_ci    the Px and Py functions.
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ciDependencies on SGIX_texture_lod
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci   LamdaX and LamdaY are clamped to the range [MIN_LOD, MAX_LOD] if the 
1575bd8deadSopenharmony_ci   SGIS_texture_lod extension is supported.
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ciErrors
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ci    None
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ciNew State
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci								Initial
1665bd8deadSopenharmony_ci    Get Value			    Get Command	     Type	Value	  Attrib
1675bd8deadSopenharmony_ci    ---------			    -----------	     ----	-------	  ------
1685bd8deadSopenharmony_ci    TEXTURE_SUPERSAMPLE_WIDTH_SGIX  GetTexParameteriv Z1*         1        texture
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ciNew Implementation Dependent State
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ci                                                                        Minimum
1735bd8deadSopenharmony_ci    Get Value                           Get Command     Type            Value
1745bd8deadSopenharmony_ci    ---------                           -----------     ----            -------
1755bd8deadSopenharmony_ci    MAX_TEXTURE_SUPERSAMPLE_WIDTH       GetIntegerv     Z1*              1
176