15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    SGIX_texture_lod_bias
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_SGIX_texture_lod_bias
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    $Date: 1996/07/09 05:27:21 $ $Revision: 1.3 $
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNumber
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    84
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciDependencies
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    EXT_texture is required
205bd8deadSopenharmony_ci    EXT_texture3D affects the definition of this extension
215bd8deadSopenharmony_ci    EXT_texture_object affects the definition of this extension
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciOverview
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    This extension modifies the calculation of texture level of detail 
265bd8deadSopenharmony_ci    parameter LOD, which is represented by the Greek character lambda
275bd8deadSopenharmony_ci    in the GL Specification. The LOD equation assumes that a 2^n x 2^m x 2^l
285bd8deadSopenharmony_ci    texture is band limited at 2^(n-1), 2^(m-1), 2^(l-1).  Often a texture is 
295bd8deadSopenharmony_ci    oversampled or filtered such that the texture is band limited at lower
305bd8deadSopenharmony_ci    frequencies in one or more dimensions.  The result is that texture-mapped 
315bd8deadSopenharmony_ci    primitives appear excessively blurry.  This extension provides biases 
325bd8deadSopenharmony_ci    for n, m, and l in the LOD calculation to to compensate for under or over 
335bd8deadSopenharmony_ci    sampled texture images.  Mipmapped textures can be made to appear sharper or
345bd8deadSopenharmony_ci    blurrier by supplying a negative or positive bias respectively. 
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    Examples of textures which can benefit from this LOD control include
375bd8deadSopenharmony_ci    video-capture images which are filtered differently horizontally and
385bd8deadSopenharmony_ci    vertically; a texture which appears blurry because it is mapped with 
395bd8deadSopenharmony_ci    a nonuniform scale, such as a road texture which is repeated hundreds of 
405bd8deadSopenharmony_ci    times in one dimension and only once in the other; and textures which
415bd8deadSopenharmony_ci    had to be magnified to a power-of-two for mipmapping.
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ciIssues
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ci    *	Should "bias" be changed to "offset"?
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ciNew Procedures and Functions
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    None
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ciNew Tokens
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    Accepted by the <pname> parameter of TexParameteri, TexParameterf,
545bd8deadSopenharmony_ci    TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv:
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_S_SGIX
575bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_T_SGIX
585bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_R_SGIX
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
615bd8deadSopenharmony_ci
625bd8deadSopenharmony_ci    None
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization)
655bd8deadSopenharmony_ci
665bd8deadSopenharmony_ci    GL Specification Table 3.7 is updated as follows:
675bd8deadSopenharmony_ci
685bd8deadSopenharmony_ci	Name				Type	    Legal Values
695bd8deadSopenharmony_ci	----				----	    ------------
705bd8deadSopenharmony_ci	TEXTURE_WRAP_S			integer	    CLAMP, REPEAT
715bd8deadSopenharmony_ci	TEXTURE_WRAP_T			integer	    CLAMP, REPEAT
725bd8deadSopenharmony_ci	TEXTURE_WRAP_R_EXT		integer	    CLAMP, REPEAT
735bd8deadSopenharmony_ci	TEXTURE_MIN_FILTER		integer	    NEAREST, LINEAR,
745bd8deadSopenharmony_ci						    NEAREST_MIPMAP_NEAREST,
755bd8deadSopenharmony_ci						    NEAREST_MIPMAP_LINEAR,
765bd8deadSopenharmony_ci						    LINEAR_MIPMAP_NEAREST,
775bd8deadSopenharmony_ci						    LINEAR_MIPMAP_LINEAR,
785bd8deadSopenharmony_ci						    FILTER4_SGIS
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	TEXTURE_LOD_BIAS_S_SGIX	float	    any value
955bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_T_SGIX	float	    any value
965bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_R_SGIX	float	    any value
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci	Table 3.7: Texture parameters and their values.
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci   Level of Detail Bias
1015bd8deadSopenharmony_ci   ------------------------
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci   This extensions redefines the equations 3.8 and 3.9 for P in Section 3.8.1 
1045bd8deadSopenharmony_ci   (Texture Minification) of the GL Specification as follows:
1055bd8deadSopenharmony_ci	
1065bd8deadSopenharmony_ci	P = max { sqrt((dlodu/dx)^2 + (dlodv/dx)^2 + (dlodw/dx)^2), 
1075bd8deadSopenharmony_ci			    sqrt((dlodu/dy)^2 + (dlodv/dy)^2 + (dlodw/dy)^2) }	(3.8)	
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ci	where 
1105bd8deadSopenharmony_ci		dlodu/dx = 2^TEXTURE_LOD_BIAS_S_SGIX * du/dx
1115bd8deadSopenharmony_ci		dlodv/dx = 2^TEXTURE_LOD_BIAS_T_SGIX * dv/dx
1125bd8deadSopenharmony_ci		dlodw/dx = 2^TEXTURE_LOD_BIAS_R_SGIX * dw/dx
1135bd8deadSopenharmony_ci		dlodu/dy = 2^TEXTURE_LOD_BIAS_S_SGIX * du/dy
1145bd8deadSopenharmony_ci		dlodv/dy = 2^TEXTURE_LOD_BIAS_T_SGIX * dv/dy
1155bd8deadSopenharmony_ci		dlodw/dy = 2^TEXTURE_LOD_BIAS_R_SGIX * dw/dy
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci    For a line the equation is redefined as:
1185bd8deadSopenharmony_ci		
1195bd8deadSopenharmony_ci	P = sqrt((dlodu/dx * deltaX + dlodu/dy * deltaY)^2 + 
1205bd8deadSopenharmony_ci		(dlodv/dx * deltaX + dlodv/dy * deltaY)^2 +
1215bd8deadSopenharmony_ci		(dlodw/dx * deltaX + dlodw/dy * deltaY)^2) / l		(3.9)
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ci    The conditions for f(x,y) in section 3.8.1 are similarly changed:
1245bd8deadSopenharmony_ci    
1255bd8deadSopenharmony_ci    1. f(x,y) is continuous and monotonically increasing in each of |dlodu/dx|,
1265bd8deadSopenharmony_ci       |dlodu/dy|, |dlodv/dx|, |dlodv/dy|, |dlodw/dx|, and |dlodw/dy|,
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ci    2. Let
1295bd8deadSopenharmony_ci	Mu = max {|dlodu/dx|, |dlodu/dy|}, Mv = max {|dlodv/dx|, |dlodv/dy|},
1305bd8deadSopenharmony_ci	and Mw = max {|dlodw/dx|, |dlodw/dy|}.
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci	Then max{Mu,Mv,Mw} <= f(x,y) < Mu + Mv + Mw.
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci    By default TEXTURE_LOD_BIAS_S_SGIX, TEXTURE_LOD_BIAS_T_SGIX, and 
1355bd8deadSopenharmony_ci    TEXTURE_LOD_BIAS_R_SGIX are 0, so they do not interfere with the normal 
1365bd8deadSopenharmony_ci    operation of texture mapping.  These values are respecified for a specific 
1375bd8deadSopenharmony_ci    texture by calling TexParameteri, TexParemeterf, TexParameteriv, or
1385bd8deadSopenharmony_ci    TexParameterfv with <target> set to TEXTURE_1D, TEXTURE_2D, or
1395bd8deadSopenharmony_ci    TEXTURE_3D_EXT, <pname> set to one of the LOD Bias names,
1405bd8deadSopenharmony_ci    and <param> set to (or <params> pointing to) the new value.  
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
1435bd8deadSopenharmony_ciand the Frame Buffer)
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ci    None
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions)
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci    None
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests)
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ci    None
1545bd8deadSopenharmony_ci
1555bd8deadSopenharmony_ciAdditions to the GLX Specification
1565bd8deadSopenharmony_ci
1575bd8deadSopenharmony_ci    None
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ciDependencies on EXT_texture
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ci    EXT_texture is required.
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ciDependencies on EXT_texture3D
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci    If EXT_texture3D is not supported, references to 3D texture mapping and
1665bd8deadSopenharmony_ci    to TEXTURE_3D_EXT in this document are invalid and should be ignored.
1675bd8deadSopenharmony_ci
1685bd8deadSopenharmony_ciDependencies on EXT_texture_object
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ci    If EXT_texture_object is implemented, the state values named
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_S_SGIX	float	    any value
1735bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_T_SGIX	float	    any value
1745bd8deadSopenharmony_ci	TEXTURE_LOD_BIAS_R_SGIX	float	    any value
1755bd8deadSopenharmony_ci
1765bd8deadSopenharmony_ci    are added to the state vector of each texture object. When an attribute
1775bd8deadSopenharmony_ci    set that includes texture information is popped, the bindings and
1785bd8deadSopenharmony_ci    enables are first restored to their pushed values, then the bound
1795bd8deadSopenharmony_ci    textures have their LOD_BIAS parameters restored to their pushed
1805bd8deadSopenharmony_ci    values.
1815bd8deadSopenharmony_ci
1825bd8deadSopenharmony_ciErrors
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ci    None
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ciNew State
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ci								Initial
1895bd8deadSopenharmony_ci    Get Value			Get Command	    Type	Value	Attrib
1905bd8deadSopenharmony_ci    ---------			-----------	    ----	-------	------
1915bd8deadSopenharmony_ci    TEXTURE_LOD_BIAS_S_SGIX	GetTexParameterfv   n x R 	    0   texture
1925bd8deadSopenharmony_ci    TEXTURE_LOD_BIAS_T_SGIX	GetTexParameterfv   n x R 	    0   texture
1935bd8deadSopenharmony_ci    TEXTURE_LOD_BIAS_R_SGIX	GetTexParameterfv   n x R 	    0   texture
1945bd8deadSopenharmony_ci
1955bd8deadSopenharmony_ciNew Implementation Dependent State
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ci    None
198