15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    SGIX_texture_mipmap_anisotropic
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_SGIX_texture_mipmap_anisotropic
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    $Date: 1998/10/21 00:42:24 $ $Revision: 1.4 $
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNumber
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    XXX
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciDependencies
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    EXT_texture3D affects the definition of this extension
205bd8deadSopenharmony_ci    SGIX_texture_lod_bias affects the definition of this extension
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciOverview
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    This extension improves the filtering quality over the standard mipmap
255bd8deadSopenharmony_ci    algorithm.  The limitation of the standard mipmap algorithm is that a 
265bd8deadSopenharmony_ci    pixel's footprint in texture space is approximated by a symmetrically
275bd8deadSopenharmony_ci    filtered sample.  The approximation becomes worse as the pixel footprint
285bd8deadSopenharmony_ci    becomes more anisotropic.  The poor approximation usually results in
295bd8deadSopenharmony_ci    the mapped image appearing excessively blurry.  This extension replaces
305bd8deadSopenharmony_ci    a single symmetric sample with the average of distributed smaller samples, 
315bd8deadSopenharmony_ci    which better approximates the pixel footprint shape.  This anisotropic
325bd8deadSopenharmony_ci    filtering method uses the existing mipmap and clipmap structures.
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ciIssues
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    *	Should this extension handle all anisotropic filtering methods?
375bd8deadSopenharmony_ci        -- No.  Since all other known anisotropic filter methods (summed-area, 
385bd8deadSopenharmony_ci           ripmap, non-mip supersampling) use different data structures,
395bd8deadSopenharmony_ci  	   the control mechanisms will be different and therefore should
405bd8deadSopenharmony_ci  	   be separate extensions.
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ciNew Procedures and Functions
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    None
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ciNew Tokens
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ci    Accepted by the <pname> parameter of TexParameteri, TexParameterf,
495bd8deadSopenharmony_ci    TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv:
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci	TEXTURE_MIPMAP_ANISOTROPY_SGIX	0x832E
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
545bd8deadSopenharmony_ci    GetFloatv, and GetDoublev:
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci        MAX_MIPMAP_ANISOTROPY_SGIX	0x832F
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ci    None
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.1 Specification (Rasterization)
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci    GL Specification Table 3.9 is updated as follows:
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci	Name				Type	    Legal Values
685bd8deadSopenharmony_ci	----				----	    ------------
695bd8deadSopenharmony_ci	TEXTURE_WRAP_S			integer	    CLAMP, REPEAT
705bd8deadSopenharmony_ci	TEXTURE_WRAP_T			integer	    CLAMP, REPEAT
715bd8deadSopenharmony_ci	TEXTURE_WRAP_R_EXT		integer	    CLAMP, REPEAT
725bd8deadSopenharmony_ci	TEXTURE_MIN_FILTER		integer	    NEAREST, LINEAR,
735bd8deadSopenharmony_ci						    NEAREST_MIPMAP_NEAREST,
745bd8deadSopenharmony_ci						    NEAREST_MIPMAP_LINEAR,
755bd8deadSopenharmony_ci						    LINEAR_MIPMAP_NEAREST,
765bd8deadSopenharmony_ci						    LINEAR_MIPMAP_LINEAR,
775bd8deadSopenharmony_ci						    FILTER4_SGIS,
785bd8deadSopenharmony_ci						    LINEAR_CLIPMAP_LINEAR_SGIX,
795bd8deadSopenharmony_ci	TEXTURE_MAG_FILTER		integer	    NEAREST, LINEAR,
805bd8deadSopenharmony_ci						    FILTER4_SGIS,
815bd8deadSopenharmony_ci						    LINEAR_DETAIL_SGIS,
825bd8deadSopenharmony_ci						    LINEAR_DETAIL_ALPHA_SGIS,
835bd8deadSopenharmony_ci						    LINEAR_DETAIL_COLOR_SGIS,
845bd8deadSopenharmony_ci						    LINEAR_SHARPEN_SGIS,
855bd8deadSopenharmony_ci						    LINEAR_SHARPEN_ALPHA_SGIS,
865bd8deadSopenharmony_ci						    LINEAR_SHARPEN_COLOR_SGIS
875bd8deadSopenharmony_ci	TEXTURE_BORDER_COLOR		4 floats    any 4 values in [0,1]
885bd8deadSopenharmony_ci	DETAIL_TEXTURE_LEVEL_SGIS	integer	    any non-negative integer
895bd8deadSopenharmony_ci	DETAIL_TEXTURE_MODE_SGIS	integer	    ADD, MODULATE
905bd8deadSopenharmony_ci	TEXTURE_MIN_LOD_SGIS		float	    any value
915bd8deadSopenharmony_ci	TEXTURE_MAX_LOD_SGIS		float	    any value
925bd8deadSopenharmony_ci	TEXTURE_BASE_LEVEL_SGIS		integer	    any non-negative integer
935bd8deadSopenharmony_ci	TEXTURE_MAX_LEVEL_SGIS		integer	    any non-negative integer
945bd8deadSopenharmony_ci        GENERATE_MIPMAP_SGIS            boolean     TRUE or FALSE
955bd8deadSopenharmony_ci        TEXTURE_CLIPMAP_FRAME_SGIX      float       any non-negative value
965bd8deadSopenharmony_ci        TEXTURE_CLIPMAP_CENTER_SGIX     2 integers  any 2 non-negative integers
975bd8deadSopenharmony_ci        TEXTURE_CLIPMAP_OFFSET_SGIX     2 integers  any 2 non-negative integers
985bd8deadSopenharmony_ci        TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 3 integers  any 3 non-negative integer
995bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_S_SGIX		float	    any value
1005bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_T_SGIX		float	    any value
1015bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_R_SGIX		float	    any value
1025bd8deadSopenharmony_ci        TEXTURE_MIPMAP_ANISOTROPY	int	    any value >= 1
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci	Table 3.9: Texture parameters and their values.
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci   Texture Minification
1075bd8deadSopenharmony_ci   ------------------------
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ci   This extensions substantially changes Section 3.8.1.  Previously
1105bd8deadSopenharmony_ci   a single scale factor P was determined based on the pixel's projection
1115bd8deadSopenharmony_ci   into texture space.  Now two scale factors, Px and Py, are computed.
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ci   Px = sqrt(dudx^2 + dvdx^2)
1145bd8deadSopenharmony_ci   Py = sqrt(dudy^2 + dvdy^2)
1155bd8deadSopenharmony_ci  
1165bd8deadSopenharmony_ci   Pmax = max(Px,Py)
1175bd8deadSopenharmony_ci   Pmin = min(Px,Py)
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci   N = min(ceil(Pmax/Pmin),TEXTURE_MIPMAP_ANISOTROPY_SGIX);
1205bd8deadSopenharmony_ci   Lamda = log2(Pmax/N)
1215bd8deadSopenharmony_ci   
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ci   It is acceptable for implementation to round 'N' up to the nearest supported
1245bd8deadSopenharmony_ci   sampling rate.  For example an implementation may only support power-of-two
1255bd8deadSopenharmony_ci   sampling rates.
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci   It is also acceptable for an implementation to approximate the ideal 
1285bd8deadSopenharmony_ci   functions Px and Py with functions Fx and Fy subject to the following
1295bd8deadSopenharmony_ci   conditions:
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci   1.  Fx is continuous and monotonically increasing in |du/dx| and |dv/dx|.
1325bd8deadSopenharmony_ci       Fy is continuous and monotonically increasing in |du/dy| and |dv/dy|.
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci   2.  max(|du/dx|,|dv/dx|} <= Fx <= |du/dx| + |dv/dx|.
1355bd8deadSopenharmony_ci       max(|du/dy|,|dv/dy|} <= Fy <= |du/dy| + |dv/dy|.
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci   Instead of a single sample, Tau, at (u,v,Lamda), 'N' locations in the mipmap
1385bd8deadSopenharmony_ci   at LOD Lamda, are sampled within the texture footprint of the pixel.
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ci             i=N
1415bd8deadSopenharmony_ci             ---
1425bd8deadSopenharmony_ci   Tau = 1/N \ Tau(u(x - 1/2 + i/(N+1), y), v(x - 1/2 + i/(N+1), y)),  Px > Py
1435bd8deadSopenharmony_ci             /          
1445bd8deadSopenharmony_ci             ---	       
1455bd8deadSopenharmony_ci             i=1
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci             i=N
1485bd8deadSopenharmony_ci             ---
1495bd8deadSopenharmony_ci   Tau = 1/N \ Tau(u(x, y - 1/2 + i/(N+1)), v(x, y - 1/2 + i/(N+1))),  Py >= Px
1505bd8deadSopenharmony_ci             /          
1515bd8deadSopenharmony_ci             ---	       
1525bd8deadSopenharmony_ci             i=1
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci
1555bd8deadSopenharmony_ci   It is acceptable to approximate the u and v functions with equally spaced
1565bd8deadSopenharmony_ci   samples in texture space at LOD Lamda:
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci             i=N
1595bd8deadSopenharmony_ci             ---
1605bd8deadSopenharmony_ci   Tau = 1/N \ Tau(u(x,y)+dudx(i/(N+1)-1/2), v(x,y)+dvdx(i/(N+1)-1/2)), Px > Py
1615bd8deadSopenharmony_ci             /          
1625bd8deadSopenharmony_ci             ---	       
1635bd8deadSopenharmony_ci             i=1
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci             i=N
1665bd8deadSopenharmony_ci             ---
1675bd8deadSopenharmony_ci   Tau = 1/N \ Tau(u(x,y)+dudy(i/(N+1)-1/2), v(x,y)+dvdy(i/(N+1)-1/2)), Py >= Px
1685bd8deadSopenharmony_ci             /          
1695bd8deadSopenharmony_ci             ---	       
1705bd8deadSopenharmony_ci             i=1
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ci
1745bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
1755bd8deadSopenharmony_ciand the Frame Buffer)
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ci    None
1785bd8deadSopenharmony_ci
1795bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.1 Specification (Special Functions)
1805bd8deadSopenharmony_ci
1815bd8deadSopenharmony_ci    None
1825bd8deadSopenharmony_ci
1835bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.1 Specification (State and State Requests)
1845bd8deadSopenharmony_ci
1855bd8deadSopenharmony_ci    None
1865bd8deadSopenharmony_ci
1875bd8deadSopenharmony_ciAdditions to the GLX Specification
1885bd8deadSopenharmony_ci
1895bd8deadSopenharmony_ci    None
1905bd8deadSopenharmony_ci
1915bd8deadSopenharmony_ciDependencies on EXT_texture3D
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci    If EXT_texture3D is supported, the functions Px, Py, and Tau are modified
1945bd8deadSopenharmony_ci    to include dwdx, dwdy, and w.
1955bd8deadSopenharmony_ci
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ciDependencies on SGIX_texture_lod_bias
1985bd8deadSopenharmony_ci
1995bd8deadSopenharmony_ci    If SGIX_texture_lod_bias is supported, dudx, dvdx, dwdx, dudy, dvdy, dwdy 
2005bd8deadSopenharmony_ci    are replaced with dlodudx, dlodvdx, dlodwdx, dlodudy, dlodvdy, dlodwdy in 
2015bd8deadSopenharmony_ci    the Px and Py functions.
2025bd8deadSopenharmony_ci
2035bd8deadSopenharmony_ciErrors
2045bd8deadSopenharmony_ci
2055bd8deadSopenharmony_ci    None
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ciNew State
2085bd8deadSopenharmony_ci
2095bd8deadSopenharmony_ci								Initial
2105bd8deadSopenharmony_ci    Get Value			   Get Command	    Type	Value	  Attrib
2115bd8deadSopenharmony_ci    ---------			   -----------	    ----	-------	  ------
2125bd8deadSopenharmony_ci    TEXTURE_MIPMAP_ANISOTROPY_SGIX GetTexParameteriv Z1*        1         texture
2135bd8deadSopenharmony_ci
2145bd8deadSopenharmony_ciNew Implementation Dependent State
2155bd8deadSopenharmony_ci
2165bd8deadSopenharmony_ci                                                                        Minimum
2175bd8deadSopenharmony_ci    Get Value                           Get Command     Type            Value
2185bd8deadSopenharmony_ci    ---------                           -----------     ----            -------
2195bd8deadSopenharmony_ci    MAX_MIPMAP_ANISOTROPY_SGIX          GetIntegerv     Z1*              2
220